From a7380357d5c10435c45d9e719799e421d0623262 Mon Sep 17 00:00:00 2001 From: Theresa Gresch Date: Tue, 14 Jul 2020 18:08:39 +0200 Subject: [PATCH] Backend: Add unit tests for internal/api --- internal/api/upload_test.go | 2 +- internal/api/user_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/upload_test.go b/internal/api/upload_test.go index 4903b769e..b2abbcc95 100644 --- a/internal/api/upload_test.go +++ b/internal/api/upload_test.go @@ -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) }) } diff --git a/internal/api/user_test.go b/internal/api/user_test.go index d1ee60b73..a274c8125 100644 --- a/internal/api/user_test.go +++ b/internal/api/user_test.go @@ -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) }) }