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

Function TestRunStatusWithDefaultName

internal/cmd/status_test.go:48–71  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

46}
47
48func TestRunStatusWithDefaultName(t *testing.T) {
49 tmpDir := t.TempDir()
50
51 prdDir := filepath.Join(tmpDir, ".chief", "prds", "main")
52 if err := os.MkdirAll(prdDir, 0755); err != nil {
53 t.Fatalf("Failed to create directory: %v", err)
54 }
55
56 prdMd := "# Main Project\n"
57 prdPath := filepath.Join(prdDir, "prd.md")
58 if err := os.WriteFile(prdPath, []byte(prdMd), 0644); err != nil {
59 t.Fatalf("Failed to create prd.md: %v", err)
60 }
61
62 opts := StatusOptions{
63 Name: "",
64 BaseDir: tmpDir,
65 }
66
67 err := RunStatus(opts)
68 if err != nil {
69 t.Errorf("RunStatus() with default name returned error: %v", err)
70 }
71}
72
73func TestRunStatusWithMissingPRD(t *testing.T) {
74 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 1

RunStatusFunction · 0.85

Tested by

no test coverage detected