(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func TestWorktreeSpinnerConfigure(t *testing.T) { |
| 9 | s := NewWorktreeSpinner() |
| 10 | s.Configure("auth", "chief/auth", "main", ".chief/worktrees/auth/", "") |
| 11 | |
| 12 | if s.prdName != "auth" { |
| 13 | t.Errorf("expected prdName 'auth', got %q", s.prdName) |
| 14 | } |
| 15 | if s.branchName != "chief/auth" { |
| 16 | t.Errorf("expected branchName 'chief/auth', got %q", s.branchName) |
| 17 | } |
| 18 | if s.defaultBranch != "main" { |
| 19 | t.Errorf("expected defaultBranch 'main', got %q", s.defaultBranch) |
| 20 | } |
| 21 | |
| 22 | // Without setup command, should have 2 steps |
| 23 | if len(s.steps) != 2 { |
| 24 | t.Errorf("expected 2 steps without setup, got %d", len(s.steps)) |
| 25 | } |
| 26 | if !s.steps[0].active { |
| 27 | t.Error("expected first step to be active") |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | func TestWorktreeSpinnerConfigureWithSetup(t *testing.T) { |
| 32 | s := NewWorktreeSpinner() |
nothing calls this directly
no test coverage detected