(t *testing.T)
| 218 | } |
| 219 | |
| 220 | func TestCanMergeNoBranch(t *testing.T) { |
| 221 | p := &PRDPicker{ |
| 222 | basePath: "/project", |
| 223 | entries: []PRDEntry{ |
| 224 | { |
| 225 | Name: "auth", |
| 226 | Completed: 8, |
| 227 | Total: 8, |
| 228 | LoopState: loop.LoopStateComplete, |
| 229 | Branch: "", |
| 230 | }, |
| 231 | }, |
| 232 | selectedIndex: 0, |
| 233 | } |
| 234 | if p.CanMerge() { |
| 235 | t.Error("expected CanMerge() to return false for completed PRD without branch") |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | func TestCanMergeRunningPRD(t *testing.T) { |
| 240 | p := &PRDPicker{ |