improved error handling

This commit is contained in:
Alex
2025-02-28 11:57:06 +01:00
parent e3ebbe596c
commit ef98745732
2 changed files with 25 additions and 27 deletions

View File

@@ -640,7 +640,7 @@ func testUpdateUser(t *testing.T, loginCookie http.Cookie, adminCookie http.Cook
u.Licence.Number = "B072RRE2I50"
u.FirstName = "John Missing ID"
},
expectedStatus: http.StatusUnauthorized,
expectedStatus: http.StatusForbidden,
expectedErrors: []map[string]string{
{"field": "user.user", "key": "server.error.unauthorized"},
},
@@ -692,7 +692,7 @@ func testUpdateUser(t *testing.T, loginCookie http.Cookie, adminCookie http.Cook
expectedErrors: []map[string]string{
{"field": "user.user", "key": "server.error.unauthorized"},
},
expectedStatus: http.StatusUnauthorized,
expectedStatus: http.StatusForbidden,
},
}
for _, tt := range tests {