Open grievances: a prejudice is not a wrong

This commit is contained in:
Meta Vens 2026-12-03 05:01:16 +01:00
commit 846c41dd09

View file

@ -642,3 +642,29 @@ fn a_sworn_reckoning_answers_a_grievance_and_a_favour_opens_none() {
strike(&mut kindly, &clockwork, 20);
assert!(open_grievances(&kindly).trim().ends_with("none"), "a favour is no grievance");
}
#[test]
fn a_dislike_nobody_earned_is_no_open_grievance() {
let directory = tempfile::tempdir().unwrap();
let (mut kernel, clockwork, _) = clock_kernel(directory.path(), "Prejudice");
play_patch(
&mut kernel,
WorldPatch {
declarations: Vec::new(),
operations: vec![ComponentOp::DeclareAttitude {
holder: Ref::Existing(clockwork.reeve),
toward: AttitudeTowardRef::Subject(Ref::Existing(clockwork.farmer)),
delta: -40,
basis: AttitudeBasisRef::Prejudice,
decay: None,
}],
evidence: Vec::new(),
},
)
.unwrap();
assert_eq!(regard(&kernel, clockwork.reeve, clockwork.farmer).total, -40);
assert!(
open_grievances(&kernel).trim().ends_with("none"),
"a feeling no deed explains wrongs no one"
);
}