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

Function TestHooksRunsCommandRequiresSession

internal/cli/hooks_test.go:283–293  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

281}
282
283func TestHooksRunsCommandRequiresSession(t *testing.T) {
284 t.Parallel()
285
286 code, _, stderr := executeRootCommandWithExit(t, newTestDeps(t, &stubClient{}), "hooks", "runs")
287 if code != 1 {
288 t.Fatalf("executeRootCommandWithExit() code = %d, want 1", code)
289 }
290 if !strings.Contains(stderr, "--session is required") {
291 t.Fatalf("stderr = %q, want session validation message", stderr)
292 }
293}
294
295func TestHooksRunsCommandParsesSinceAndRendersFormats(t *testing.T) {
296 t.Parallel()

Callers

nothing calls this directly

Calls 3

newTestDepsFunction · 0.85
ContainsMethod · 0.80

Tested by

no test coverage detected