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

Function TestSessionNewRejectsRelativeCWD

internal/cli/session_test.go:238–257  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

236}
237
238func TestSessionNewRejectsRelativeCWD(t *testing.T) {
239 t.Parallel()
240
241 tests := []string{".", "../project"}
242 for _, cwd := range tests {
243 t.Run(cwd, func(t *testing.T) {
244 t.Parallel()
245
246 code, _, stderr := executeRootCommandWithExit(t, newTestDeps(t, &stubClient{}),
247 "session", "new", "--cwd", cwd,
248 )
249 if code != 1 {
250 t.Fatalf("executeRootCommandWithExit(%q) code = %d, want 1", cwd, code)
251 }
252 if !strings.Contains(stderr, "--cwd must be an absolute path") {
253 t.Fatalf("stderr = %q, want absolute path validation message", stderr)
254 }
255 })
256 }
257}
258
259func TestSessionListPassesWorkspaceFilter(t *testing.T) {
260 t.Parallel()

Callers

nothing calls this directly

Calls 4

newTestDepsFunction · 0.85
ContainsMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected