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

Function TestRunStatusAllComplete

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

Source from the content-addressed store, hash-verified

164}
165
166func TestRunStatusAllComplete(t *testing.T) {
167 tmpDir := t.TempDir()
168
169 prdDir := filepath.Join(tmpDir, ".chief", "prds", "done")
170 if err := os.MkdirAll(prdDir, 0755); err != nil {
171 t.Fatalf("Failed to create directory: %v", err)
172 }
173
174 prdMd := "# Complete Project\n\n### US-001: Story 1\n**Status:** done\n- [x] Done\n\n### US-002: Story 2\n**Status:** done\n- [x] Done\n"
175 prdPath := filepath.Join(prdDir, "prd.md")
176 if err := os.WriteFile(prdPath, []byte(prdMd), 0644); err != nil {
177 t.Fatalf("Failed to create prd.md: %v", err)
178 }
179
180 opts := StatusOptions{
181 Name: "done",
182 BaseDir: tmpDir,
183 }
184
185 err := RunStatus(opts)
186 if err != nil {
187 t.Errorf("RunStatus() returned error: %v", err)
188 }
189}
190
191func TestRunStatusEmptyPRD(t *testing.T) {
192 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 1

RunStatusFunction · 0.85

Tested by

no test coverage detected