diff --git a/backend/tests/test_body_limit.py b/backend/tests/test_body_limit.py index c11d4187..05bebba7 100644 --- a/backend/tests/test_body_limit.py +++ b/backend/tests/test_body_limit.py @@ -284,9 +284,14 @@ def test_a_stored_override_outside_the_bounds_falls_back_on_READ(db): db.commit() assert sysconfig.get_int(db, "download_upload_max_bytes") == default - row.value = str(spec.max) # still in range — an override that is fine is still honoured + # An override that IS in range must still be honoured — otherwise a bounds predicate written + # backwards would make every override inert and the two assertions above could not tell. + # Deliberately not `spec.max`: that equals the env default for this key, so the assertion would + # be satisfied by the fallback it is meant to rule out. + row.value = str(spec.max - 1) db.commit() - assert sysconfig.get_int(db, "download_upload_max_bytes") == spec.max + assert spec.max - 1 != default + assert sysconfig.get_int(db, "download_upload_max_bytes") == spec.max - 1 def test_the_cap_sits_inside_the_response_decorators_and_outside_the_setup_gate(): diff --git a/frontend/src/components/TagFilterChips.dom.test.tsx b/frontend/src/components/TagFilterChips.dom.test.tsx index 8a12615f..cd2513fe 100644 --- a/frontend/src/components/TagFilterChips.dom.test.tsx +++ b/frontend/src/components/TagFilterChips.dom.test.tsx @@ -75,7 +75,7 @@ describe("TagFilterChips — the overflow menu", () => { // // So `fit.visible` is left ALONE across the shrink — that staleness is the precondition, not a // convenience of the mock. Five chips of which three fit, then three of them are deleted in the - // tag manager: 3 - 5 = -2. + // tag manager — so the shrink render computes `chips.length - visible` = 2 - 3 = -1. const five = ["alpha", "beta", "gamma", "delta", "epsilon"].map(chip); fit.visible = 3; const { rerender } = render();