(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func 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 | |
| 61 | func TestHandleAgentActivity_AgentNotFound(t *testing.T) { |
| 62 | ua, _, token := setupUserAuth(t) |
nothing calls this directly
no test coverage detected