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

Function TestSessionNewRejectsInvalidWorkspaceFlags

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

Source from the content-addressed store, hash-verified

222}
223
224func TestSessionNewRejectsInvalidWorkspaceFlags(t *testing.T) {
225 t.Parallel()
226
227 code, _, stderr := executeRootCommandWithExit(t, newTestDeps(t, &stubClient{}),
228 "session", "new", "--workspace", "ws_abc", "--cwd", "/tmp/proj",
229 )
230 if code != 1 {
231 t.Fatalf("executeRootCommandWithExit() code = %d, want 1", code)
232 }
233 if !strings.Contains(stderr, "--workspace and --cwd are mutually exclusive") {
234 t.Fatalf("stderr = %q, want workspace flag validation message", stderr)
235 }
236}
237
238func TestSessionNewRejectsRelativeCWD(t *testing.T) {
239 t.Parallel()

Callers

nothing calls this directly

Calls 3

newTestDepsFunction · 0.85
ContainsMethod · 0.80

Tested by

no test coverage detected