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
Этот коммит содержится в:
Joram Wilander
2017-02-21 19:42:34 -05:00
коммит произвёл GitHub
родитель b61115df55
Коммит 69cac604e0
11 изменённых файлов: 414 добавлений и 51 удалений

Просмотреть файл

@@ -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()