TestStatusBarOmitsBudgetWithoutHeaders: endpoint sends no budget header, no pass segment appears.
(t *testing.T)
| 1365 | // so without a live value the floor must apply. |
| 1366 | func TestActiveContextSizePrefersLiveValue(t *testing.T) { |
| 1367 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 1368 | m.cfg.Active = "hamrpass" // ContextSize=0 by Bootstrap |
| 1369 | if got := m.activeContextSize(); got != defaultPackFallback { |
| 1370 | t.Fatalf("cloud profile with no live value should use floor %d, got %d", |
| 1371 | defaultPackFallback, got) |
| 1372 | } |
| 1373 | m.liveContextSize["hamrpass"] = 262144 |
| 1374 | if got := m.activeContextSize(); got != 262144 { |
| 1375 | t.Fatalf("live value must win, got %d", got) |
| 1376 | } |
| 1377 | } |
| 1378 | |
| 1379 | // TestStatusBarShowsBudgetFromHeaders: the pass segment renders whenever |