(t *testing.T)
| 369 | } |
| 370 | |
| 371 | func TestSet_CancelledStatus(t *testing.T) { |
| 372 | tmpDir := createSetTestFiles(t) |
| 373 | resetSetFlags() |
| 374 | taskDir = tmpDir |
| 375 | setTaskID = "002" |
| 376 | setStatus = "cancelled" |
| 377 | |
| 378 | output, err := captureSetOutput(t) |
| 379 | if err != nil { |
| 380 | t.Fatalf("unexpected error when setting status to cancelled: %v", err) |
| 381 | } |
| 382 | |
| 383 | if !strings.Contains(output, "status: in-progress -> cancelled") { |
| 384 | t.Errorf("Expected status change to cancelled in output, got: %s", output) |
| 385 | } |
| 386 | |
| 387 | content, _ := os.ReadFile(filepath.Join(tmpDir, "002-auth.md")) |
| 388 | if !strings.Contains(string(content), "status: cancelled") { |
| 389 | t.Error("Expected file to contain status: cancelled") |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | func TestSet_AllValidPriorities(t *testing.T) { |
| 394 | priorities := []string{"low", "medium", "high", "critical"} |
nothing calls this directly
no test coverage detected