--- Clean Action Tests ---
(t *testing.T)
| 400 | // --- Clean Action Tests --- |
| 401 | |
| 402 | func TestCanCleanNonRunningWithWorktree(t *testing.T) { |
| 403 | p := &PRDPicker{ |
| 404 | basePath: "/project", |
| 405 | entries: []PRDEntry{ |
| 406 | { |
| 407 | Name: "auth", |
| 408 | Completed: 8, |
| 409 | Total: 8, |
| 410 | LoopState: loop.LoopStateComplete, |
| 411 | Branch: "chief/auth", |
| 412 | WorktreeDir: "/project/.chief/worktrees/auth", |
| 413 | }, |
| 414 | }, |
| 415 | selectedIndex: 0, |
| 416 | } |
| 417 | if !p.CanClean() { |
| 418 | t.Error("expected CanClean() to return true for completed non-running PRD with worktree") |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | func TestCanCleanDisabledForRunningPRD(t *testing.T) { |
| 423 | p := &PRDPicker{ |