MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestHandleUpdateMe_Unauthenticated

Function TestHandleUpdateMe_Unauthenticated

internal/auth/auth_test.go:298–308  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

296}
297
298func 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
310func TestHandleUpdateMe_ValidationErrors(t *testing.T) {
311 ua, _, token := setupUserAuth(t)

Callers

nothing calls this directly

Calls 2

setupUserAuthFunction · 0.85
HandleUpdateMeMethod · 0.80

Tested by

no test coverage detected