(t *testing.T)
| 558 | } |
| 559 | |
| 560 | func TestCleanConfirmationCancel(t *testing.T) { |
| 561 | p := &PRDPicker{ |
| 562 | basePath: "/project", |
| 563 | entries: []PRDEntry{ |
| 564 | { |
| 565 | Name: "auth", |
| 566 | Branch: "chief/auth", |
| 567 | WorktreeDir: "/project/.chief/worktrees/auth", |
| 568 | }, |
| 569 | }, |
| 570 | selectedIndex: 0, |
| 571 | } |
| 572 | p.StartCleanConfirmation() |
| 573 | |
| 574 | if !p.HasCleanConfirmation() { |
| 575 | t.Fatal("expected confirmation to be active") |
| 576 | } |
| 577 | |
| 578 | p.CancelCleanConfirmation() |
| 579 | |
| 580 | if p.HasCleanConfirmation() { |
| 581 | t.Error("expected confirmation to be cancelled") |
| 582 | } |
| 583 | } |
| 584 | |
| 585 | func TestCleanConfirmationRendering(t *testing.T) { |
| 586 | p := &PRDPicker{ |
nothing calls this directly
no test coverage detected