Implement create and get incoming webhook endpoints for APIv4 (#5407)
* Implement POST /hooks/incoming endpoint for APIv4 * Implement GET /hooks/incoming endpoint for APIv4 * Updates per feedback
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b61115df55
Коммит
69cac604e0
@@ -422,6 +422,21 @@ func CheckBadRequestStatus(t *testing.T, resp *model.Response) {
|
||||
}
|
||||
}
|
||||
|
||||
func CheckNotImplementedStatus(t *testing.T, resp *model.Response) {
|
||||
if resp.Error == nil {
|
||||
debug.PrintStack()
|
||||
t.Fatal("should have errored with status:" + strconv.Itoa(http.StatusNotImplemented))
|
||||
return
|
||||
}
|
||||
|
||||
if resp.StatusCode != http.StatusNotImplemented {
|
||||
debug.PrintStack()
|
||||
t.Log("actual: " + strconv.Itoa(resp.StatusCode))
|
||||
t.Log("expected: " + strconv.Itoa(http.StatusNotImplemented))
|
||||
t.Fatal("wrong status code")
|
||||
}
|
||||
}
|
||||
|
||||
func CheckErrorMessage(t *testing.T, resp *model.Response, errorId string) {
|
||||
if resp.Error == nil {
|
||||
debug.PrintStack()
|
||||
|
||||
Ссылка в новой задаче
Block a user