MCPcopy Create free account
hub / github.com/codehamr/codehamr / TestStatusBarOmitsBudgetWithoutHeaders

Function TestStatusBarOmitsBudgetWithoutHeaders

internal/tui/tui_test.go:1367–1376  ·  view source on GitHub ↗

TestStatusBarOmitsBudgetWithoutHeaders: endpoint sends no budget header, no pass segment appears.

(t *testing.T)

Source from the content-addressed store, hash-verified

1365// so without a live value the floor must apply.
1366func 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

Callers

nothing calls this directly

Calls 2

runTurnFunction · 0.85
ViewMethod · 0.45

Tested by

no test coverage detected