diff options
Diffstat (limited to 'api4/apitestlib.go')
-rw-r--r-- | api4/apitestlib.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/api4/apitestlib.go b/api4/apitestlib.go index 2647f20f6..3d2feaf6e 100644 --- a/api4/apitestlib.go +++ b/api4/apitestlib.go @@ -441,6 +441,14 @@ func CheckNotImplementedStatus(t *testing.T, resp *model.Response) { } } +func CheckOKStatus(t *testing.T, resp *model.Response) { + CheckNoError(t, resp) + + if resp.StatusCode != http.StatusOK { + t.Fatalf("wrong status code. expected %d got %d", http.StatusOK, resp.StatusCode) + } +} + func CheckErrorMessage(t *testing.T, resp *model.Response, errorId string) { if resp.Error == nil { debug.PrintStack() |