From 3148dbba43c889cd32586a89d9d6fda1a87167a1 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 31 Oct 2026 09:56:52 +0100 Subject: [PATCH] tests: the withdrawal read test borrows the mind per call Co-Authored-By: Claude Sonnet 5.5 --- crates/huginn-mind/src/query.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/huginn-mind/src/query.rs b/crates/huginn-mind/src/query.rs index 634320e..c4d00cb 100644 --- a/crates/huginn-mind/src/query.rs +++ b/crates/huginn-mind/src/query.rs @@ -1503,17 +1503,17 @@ mod tests { }; committed(admit(&mut mind, vec![pulse("vote", Some(60), false)])); committed(admit(&mut mind, vec![pulse("withdraw", None, true)])); - let newest = || { + let newest = |mind: &Mind| { let selection = Selection { descending: true, limit: Some(1), ..with(of_kinds(&[K::Pulse]), any_of("voted", &["true"])) }; let page = mind.query(&selection).unwrap(); headers(&page).to_vec() }; - let found = newest(); + let found = newest(&mind); assert_eq!(found.len(), 1); assert_eq!(found[0].id.id.0, format!("{INSTANCE}:pulse:withdraw")); assert!(matches!(found[0].facts, PipelineFacts::Pulse { tempo_vote_beat_s: None, tempo_vote_withdrawn: true, .. }), "{:?}", found[0].facts); committed(admit(&mut mind, vec![pulse("again", Some(90), false)])); - let found = newest(); + let found = newest(&mind); assert!(matches!(found[0].facts, PipelineFacts::Pulse { tempo_vote_beat_s: Some(90), tempo_vote_withdrawn: false, .. }), "{:?}", found[0].facts); }