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

Function TestHandleDashboardStats_Unauthenticated

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

Source from the content-addressed store, hash-verified

400}
401
402func TestHandleDashboardStats_Unauthenticated(t *testing.T) {
403 ua, _, _ := setupUserAuth(t)
404
405 req := httptest.NewRequest("GET", "/api/dashboard/stats", nil)
406 w := httptest.NewRecorder()
407 ua.HandleDashboardStats(w, req)
408
409 if w.Code != http.StatusUnauthorized {
410 t.Errorf("status = %d, want 401", w.Code)
411 }
412}
413
414// TestHandleDashboardStats_WindowQueryParam: the same endpoint powers
415// both the dashboard at-a-glance strip (default 7-day window) and the

Callers

nothing calls this directly

Calls 2

setupUserAuthFunction · 0.85
HandleDashboardStatsMethod · 0.80

Tested by

no test coverage detected