(t *testing.T)
| 203 | } |
| 204 | |
| 205 | func TestBranchWarningPathHints(t *testing.T) { |
| 206 | bw := NewBranchWarning() |
| 207 | bw.SetSize(80, 24) |
| 208 | bw.SetContext("main", "auth", ".chief/worktrees/auth/") |
| 209 | bw.SetDialogContext(DialogProtectedBranch) |
| 210 | |
| 211 | // Check that options have correct path hints |
| 212 | if bw.options[0].hint != "./ (current directory)" { |
| 213 | t.Errorf("expected current dir hint for branch only, got %q", bw.options[0].hint) |
| 214 | } |
| 215 | if bw.options[1].hint != ".chief/worktrees/auth/" { |
| 216 | t.Errorf("expected worktree path hint, got %q", bw.options[1].hint) |
| 217 | } |
| 218 | if bw.options[2].hint != "./ (current directory)" { |
| 219 | t.Errorf("expected current dir hint for continue, got %q", bw.options[2].hint) |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | func TestBranchWarningRender(t *testing.T) { |
| 224 | // Test that Render doesn't panic for each context |
nothing calls this directly
no test coverage detected