MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestRunEditRequiresPRDExists

Function TestRunEditRequiresPRDExists

internal/cmd/edit_test.go:9–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestRunEditRequiresPRDExists(t *testing.T) {
10 tmpDir := t.TempDir()
11
12 opts := EditOptions{
13 Name: "nonexistent",
14 BaseDir: tmpDir,
15 }
16
17 err := RunEdit(opts)
18 if err == nil {
19 t.Error("Expected error for non-existent PRD")
20 }
21
22 // Error message should suggest using chief new
23 if err != nil {
24 errStr := err.Error()
25 if !contains(errStr, "chief new") {
26 t.Errorf("Error should suggest chief new, got: %s", errStr)
27 }
28 }
29}
30
31func TestRunEditRejectsInvalidName(t *testing.T) {
32 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 2

RunEditFunction · 0.85
containsFunction · 0.70

Tested by

no test coverage detected