(t *testing.T)
| 179 | } |
| 180 | |
| 181 | func TestRenderEntryWithLoadError(t *testing.T) { |
| 182 | p := &PRDPicker{ |
| 183 | basePath: "/project", |
| 184 | entries: []PRDEntry{ |
| 185 | { |
| 186 | Name: "broken", |
| 187 | LoadError: fmt.Errorf("parse error"), |
| 188 | Branch: "chief/broken", |
| 189 | WorktreeDir: "/project/.chief/worktrees/broken", |
| 190 | }, |
| 191 | }, |
| 192 | } |
| 193 | |
| 194 | result := p.renderEntry(p.entries[0], false, 80) |
| 195 | // With load error, should show [error] but not branch/worktree info |
| 196 | if !containsText(result, "error") { |
| 197 | t.Errorf("expected [error] in output, got: %s", result) |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | func TestCanMergeCompletedWithBranch(t *testing.T) { |
| 202 | p := &PRDPicker{ |
nothing calls this directly
no test coverage detected