(t *testing.T)
| 440 | } |
| 441 | |
| 442 | func TestCanCleanDisabledWithoutWorktree(t *testing.T) { |
| 443 | p := &PRDPicker{ |
| 444 | basePath: "/project", |
| 445 | entries: []PRDEntry{ |
| 446 | { |
| 447 | Name: "auth", |
| 448 | Completed: 8, |
| 449 | Total: 8, |
| 450 | LoopState: loop.LoopStateComplete, |
| 451 | Branch: "chief/auth", |
| 452 | }, |
| 453 | }, |
| 454 | selectedIndex: 0, |
| 455 | } |
| 456 | if p.CanClean() { |
| 457 | t.Error("expected CanClean() to return false for PRD without worktree") |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | func TestCanCleanStoppedPRD(t *testing.T) { |
| 462 | p := &PRDPicker{ |