(t *testing.T)
| 346 | } |
| 347 | |
| 348 | func 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 | |
| 371 | func TestSet_CancelledStatus(t *testing.T) { |
| 372 | tmpDir := createSetTestFiles(t) |
nothing calls this directly
no test coverage detected