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

Function TestWorkspaceEditRequiresChanges

internal/cli/workspace_test.go:485–499  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

483}
484
485func TestWorkspaceEditRequiresChanges(t *testing.T) {
486 t.Parallel()
487
488 t.Run("Should require changes", func(t *testing.T) {
489 t.Parallel()
490
491 code, _, stderr := executeRootCommandWithExit(t, newTestDeps(t, &stubClient{}), "workspace", "edit", "alpha")
492 if code != 1 {
493 t.Fatalf("executeRootCommandWithExit() code = %d, want 1", code)
494 }
495 if !strings.Contains(stderr, "at least one edit flag is required") {
496 t.Fatalf("stderr = %q, want edit validation message", stderr)
497 }
498 })
499}
500
501func derefString(value *string) string {
502 if value == nil {

Callers

nothing calls this directly

Calls 4

newTestDepsFunction · 0.85
ContainsMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected