Backend: Add unit tests for internal/api
This commit is contained in:
parent
f47256b49f
commit
a7380357d5
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue