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

Function TestHandleAgentActivity_Unauthenticated

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

Source from the content-addressed store, hash-verified

47}
48
49func TestHandleAgentActivity_Unauthenticated(t *testing.T) {
50 ua, _, _ := setupUserAuth(t)
51
52 req := httptest.NewRequest("GET", "/api/dashboard/agents/agent%40test.example.com/activity", nil)
53 w := httptest.NewRecorder()
54 ua.HandleAgentActivity(w, req)
55
56 if w.Code != http.StatusUnauthorized {
57 t.Errorf("status = %d, want 401", w.Code)
58 }
59}
60
61func TestHandleAgentActivity_AgentNotFound(t *testing.T) {
62 ua, _, token := setupUserAuth(t)

Callers

nothing calls this directly

Calls 2

setupUserAuthFunction · 0.85
HandleAgentActivityMethod · 0.80

Tested by

no test coverage detected