Backend: Add unit tests for internal/api

This commit is contained in:
Theresa Gresch 2020-07-14 18:08:39 +02:00
parent f47256b49f
commit a7380357d5
2 changed files with 2 additions and 2 deletions

View file

@ -11,6 +11,6 @@ func TestUpload(t *testing.T) {
app, router, _ := NewApiTest()
Upload(router)
r := PerformRequest(app, "POST", "/api/v1/upload/xxx")
assert.Equal(t, http.StatusForbidden, r.Code)
assert.Equal(t, http.StatusBadRequest, r.Code)
})
}

View file

@ -11,6 +11,6 @@ func TestChangePassword(t *testing.T) {
app, router, _ := NewApiTest()
ChangePassword(router)
r := PerformRequestWithBody(app, "PUT", "/api/v1/users/xxx/password", `{}`)
assert.Equal(t, http.StatusNotFound, r.Code)
assert.Equal(t, http.StatusForbidden, r.Code)
})
}