(t *testing.T)
| 115 | } |
| 116 | |
| 117 | func TestRenderTabEmptyBranch(t *testing.T) { |
| 118 | tb := &TabBar{} |
| 119 | |
| 120 | entry := TabEntry{ |
| 121 | Name: "auth", |
| 122 | Branch: "", |
| 123 | LoopState: loop.LoopStateReady, |
| 124 | Total: 5, |
| 125 | Completed: 2, |
| 126 | } |
| 127 | |
| 128 | result := tb.renderTab(entry, 1) |
| 129 | if strings.Contains(result, "[]") { |
| 130 | t.Errorf("expected empty branch to not show empty brackets, got: %s", result) |
| 131 | } |
| 132 | } |