MCPcopy Create free account
hub / github.com/driangle/taskmd / TestSet_AllValidStatuses

Function TestSet_AllValidStatuses

apps/cli/internal/cli/set_test.go:348–369  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

346}
347
348func TestSet_AllValidStatuses(t *testing.T) {
349 statuses := []string{"pending", "in-progress", "completed", "in-review", "blocked", "cancelled"}
350 for _, status := range statuses {
351 t.Run(status, func(t *testing.T) {
352 tmpDir := createSetTestFiles(t)
353 resetSetFlags()
354 taskDir = tmpDir
355 setTaskID = "001"
356 setStatus = status
357
358 _, err := captureSetOutput(t)
359 if err != nil {
360 t.Fatalf("unexpected error for status %q: %v", status, err)
361 }
362
363 content, _ := os.ReadFile(filepath.Join(tmpDir, "001-setup.md"))
364 if !strings.Contains(string(content), "status: "+status) {
365 t.Errorf("Expected file to contain status: %s", status)
366 }
367 })
368 }
369}
370
371func TestSet_CancelledStatus(t *testing.T) {
372 tmpDir := createSetTestFiles(t)

Callers

nothing calls this directly

Calls 3

createSetTestFilesFunction · 0.85
resetSetFlagsFunction · 0.85
captureSetOutputFunction · 0.85

Tested by

no test coverage detected