(t *testing.T)
| 420 | } |
| 421 | |
| 422 | func TestCanCleanDisabledForRunningPRD(t *testing.T) { |
| 423 | p := &PRDPicker{ |
| 424 | basePath: "/project", |
| 425 | entries: []PRDEntry{ |
| 426 | { |
| 427 | Name: "auth", |
| 428 | Completed: 3, |
| 429 | Total: 8, |
| 430 | LoopState: loop.LoopStateRunning, |
| 431 | Branch: "chief/auth", |
| 432 | WorktreeDir: "/project/.chief/worktrees/auth", |
| 433 | }, |
| 434 | }, |
| 435 | selectedIndex: 0, |
| 436 | } |
| 437 | if p.CanClean() { |
| 438 | t.Error("expected CanClean() to return false for running PRD") |
| 439 | } |
| 440 | } |
| 441 | |
| 442 | func TestCanCleanDisabledWithoutWorktree(t *testing.T) { |
| 443 | p := &PRDPicker{ |