MCPcopy Create free account
hub / github.com/compozy/agh / TestHookRunsHandlerRejectsMissingSession

Function TestHookRunsHandlerRejectsMissingSession

internal/api/httpapi/hooks_test.go:192–200  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

190}
191
192func TestHookRunsHandlerRejectsMissingSession(t *testing.T) {
193 t.Parallel()
194
195 engine := newTestRouter(t, newTestHandlers(t, stubSessionManager{}, stubObserver{}, newTestHomePaths(t)))
196 recorder := performRequest(t, engine, http.MethodGet, "/api/workspaces/ws-workspace/hooks/runs", nil)
197 if recorder.Code != http.StatusBadRequest {
198 t.Fatalf("status = %d, want %d; body=%s", recorder.Code, http.StatusBadRequest, recorder.Body.String())
199 }
200}
201
202func TestHookRunsHandlerRejectsForeignWorkspaceSession(t *testing.T) {
203 t.Parallel()

Callers

nothing calls this directly

Calls 5

newTestRouterFunction · 0.70
newTestHandlersFunction · 0.70
newTestHomePathsFunction · 0.70
performRequestFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected