(t *testing.T)
| 221 | } |
| 222 | |
| 223 | func TestBranchWarningRender(t *testing.T) { |
| 224 | // Test that Render doesn't panic for each context |
| 225 | contexts := []DialogContext{DialogProtectedBranch, DialogAnotherPRDRunning, DialogNoConflicts} |
| 226 | for _, ctx := range contexts { |
| 227 | bw := NewBranchWarning() |
| 228 | bw.SetSize(80, 24) |
| 229 | bw.SetContext("main", "auth", ".chief/worktrees/auth/") |
| 230 | bw.SetDialogContext(ctx) |
| 231 | bw.Reset() |
| 232 | |
| 233 | output := bw.Render() |
| 234 | if output == "" { |
| 235 | t.Errorf("expected non-empty render for context %d", ctx) |
| 236 | } |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | func TestBranchWarningGetDialogContext(t *testing.T) { |
| 241 | bw := NewBranchWarning() |
nothing calls this directly
no test coverage detected