From c966ae13d7d3c4b7744818769ebcc76ac3cb6b70 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 3 Dec 2026 13:40:25 +0100 Subject: [PATCH] tests: the route's wave test puts the Warden in a gatehouse beyond the room and tunes the bands through the DM's own tool Co-Authored-By: Claude Opus 5.5 --- crates/ghostlight-dungeon/src/api.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/ghostlight-dungeon/src/api.rs b/crates/ghostlight-dungeon/src/api.rs index 991c1a5..83ee34b 100644 --- a/crates/ghostlight-dungeon/src/api.rs +++ b/crates/ghostlight-dungeon/src/api.rs @@ -1336,8 +1336,9 @@ mod tests { /// A turn that closes runs the world ahead; a turn that stops to ask the /// player does not. - /// The route's own wiring of the world wave: the DM declares a Warden and - /// lets a day pass, the closed turn runs a wave over it, and the next + /// The route's own wiring of the world wave: the DM declares a Warden in a + /// gatehouse beyond the room, tunes the bands so the gatehouse is soon due, + /// and lets a day pass; the closed turn runs a wave over it, and the next /// turn's opening view says what moved. #[tokio::test] async fn a_closed_turn_moves_the_world_and_the_next_view_says_so() { @@ -1350,10 +1351,11 @@ mod tests { let cookie = app.cookies[0].clone(); let timeline = begin_one(&app, &cookie).await; let host = app.state.timelines.host(&timeline).await.unwrap(); - let (speak, place) = ids(&host.world.snapshot().await.unwrap()); + let (speak, _) = ids(&host.world.snapshot().await.unwrap()); app.rig.port.push(Ok(output( "r0", vec![ + call_event("c5", "declare_place", json!({"handle": "gate", "label": "Gatehouse", "container": null})), call_event( "c0", "declare_subject", @@ -1363,9 +1365,10 @@ mod tests { "kind": "institution", "controller": {"type": "operational_agent"}, "affordances": [{"ref": "existing", "value": speak}], - "position": {"ref": "existing", "value": place}, + "position": {"ref": "draft", "value": "gate"}, }), ), + call_event("c6", "tune", json!({"bands": [60, 60, 60]})), call_event("c1", "advance_time", json!({"minutes": 400})), call_event("c2", END_TURN_TOOL, json!({})), ],