From b00a3cceea84fd36cc9357839b636f797a2250cb Mon Sep 17 00:00:00 2001 From: mwiegand Date: Tue, 12 May 2026 22:17:02 +0200 Subject: [PATCH] test(live-state): assert stale server's map is not rendered in the badge Closes the negative-assertion gap from the Task 10 review: without this check, a regression that drops the freshness guard would still pass the positive 2/4 + c1m2_streets assertions. Co-Authored-By: Claude Sonnet 4.6 --- l4d2web/tests/test_servers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/l4d2web/tests/test_servers.py b/l4d2web/tests/test_servers.py index dcfdf29..7742230 100644 --- a/l4d2web/tests/test_servers.py +++ b/l4d2web/tests/test_servers.py @@ -506,6 +506,8 @@ def test_servers_index_renders_live_state_badge(user_client_with_blueprints) -> html = res.get_data(as_text=True) assert "2/4" in html assert "c1m2_streets" in html + # Stale server's map MUST NOT render — fresh badge condition must guard it. + assert "c1m1_hotel" not in html def test_reset_operation_enqueues_job_and_stops_desired_state(user_client_with_blueprints) -> None: