Open grievances: a prejudice is not a wrong
This commit is contained in:
parent
9e6fcd6bc5
commit
846c41dd09
1 changed files with 26 additions and 0 deletions
|
|
@ -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"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue