mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Use 201 status code where appropriate for APIv4 (#5903)
This commit is contained in:
committed by
Christopher Speller
parent
4e224c2996
commit
5f6d50bff1
@@ -442,6 +442,15 @@ func CheckNoError(t *testing.T, resp *model.Response) {
|
||||
}
|
||||
}
|
||||
|
||||
func CheckCreatedStatus(t *testing.T, resp *model.Response) {
|
||||
if resp.StatusCode != http.StatusCreated {
|
||||
debug.PrintStack()
|
||||
t.Log("actual: " + strconv.Itoa(resp.StatusCode))
|
||||
t.Log("expected: " + strconv.Itoa(http.StatusCreated))
|
||||
t.Fatal("wrong status code")
|
||||
}
|
||||
}
|
||||
|
||||
func CheckForbiddenStatus(t *testing.T, resp *model.Response) {
|
||||
if resp.Error == nil {
|
||||
debug.PrintStack()
|
||||
|
||||
Reference in New Issue
Block a user