(t *testing.T)
| 296 | } |
| 297 | |
| 298 | func TestHandleUpdateMe_Unauthenticated(t *testing.T) { |
| 299 | ua, _, _ := setupUserAuth(t) |
| 300 | |
| 301 | req := httptest.NewRequest("PATCH", "/api/auth/me", strings.NewReader(`{"name":"Jamie"}`)) |
| 302 | w := httptest.NewRecorder() |
| 303 | ua.HandleUpdateMe(w, req) |
| 304 | |
| 305 | if w.Code != http.StatusUnauthorized { |
| 306 | t.Errorf("status = %d, want 401", w.Code) |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | func TestHandleUpdateMe_ValidationErrors(t *testing.T) { |
| 311 | ua, _, token := setupUserAuth(t) |
nothing calls this directly
no test coverage detected