(t *testing.T)
| 1351 | } |
| 1352 | |
| 1353 | func TestSet_DoneFlag_PRReviewWorkflow(t *testing.T) { |
| 1354 | tmpDir := createSetTestFiles(t) |
| 1355 | resetSetFlags() |
| 1356 | taskDir = tmpDir |
| 1357 | setDone = true |
| 1358 | |
| 1359 | // Simulate pr-review workflow via viper |
| 1360 | viper.Set("workflow", "pr-review") |
| 1361 | defer viper.Set("workflow", "") |
| 1362 | |
| 1363 | // Use positional arg to avoid flag state leakage |
| 1364 | output, err := captureSetOutputWithArgs(t, []string{"001"}) |
| 1365 | if err != nil { |
| 1366 | t.Fatalf("unexpected error: %v", err) |
| 1367 | } |
| 1368 | |
| 1369 | if !strings.Contains(output, "status: pending -> in-review") { |
| 1370 | t.Errorf("Expected --done to set status to in-review in pr-review workflow, got: %s", output) |
| 1371 | } |
| 1372 | |
| 1373 | content, _ := os.ReadFile(filepath.Join(tmpDir, "001-setup.md")) |
| 1374 | if !strings.Contains(string(content), "status: in-review") { |
| 1375 | t.Error("Expected file to contain in-review status") |
| 1376 | } |
| 1377 | } |
| 1378 | |
| 1379 | func TestSet_DependsOn(t *testing.T) { |
| 1380 | tmpDir := createSetTestFiles(t) |
nothing calls this directly
no test coverage detected