MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestCmdEditUnknownRef

Function TestCmdEditUnknownRef

internal/app/edit_test.go:109–121  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

107}
108
109func TestCmdEditUnknownRef(t *testing.T) {
110 _, _ = showListEditDB(t)
111 os.Setenv("EDITOR", "true") // no-op; should never run
112 t.Cleanup(func() { os.Unsetenv("EDITOR") })
113 out := captureStdout(t, func() {
114 if rc := cmdEdit([]string{"ghost"}); rc != 1 {
115 t.Errorf("rc=%d, want 1", rc)
116 }
117 })
118 if !strings.Contains(out, "no task, project, or playbook matching") {
119 t.Errorf("missing error; out=%q", out)
120 }
121}
122
123func TestCmdEditMissingRef(t *testing.T) {
124 _, _ = showListEditDB(t)

Callers

nothing calls this directly

Calls 3

showListEditDBFunction · 0.85
captureStdoutFunction · 0.85
cmdEditFunction · 0.85

Tested by

no test coverage detected