refactor(arap): rustfmt the unit's files, and the write-off's SOURCE line (P4b S7)
No behaviour: the files as rustfmt leaves them after the unit's edits (the commits before this one were made before the formatter ran), and the Ledger::write_off spec block cites A-5 alone for the direct write-off method (A-6 is the hand-entry refusal, not this command).
This commit is contained in:
1 parent
f31dd2640b
commit
22cdfcf34b
9 files changed
+75
-50
No files matched your search
@@ -252,8 +252,7 @@ fn a_write_off_shows_on_the_timeline() {
|
||||
let mut h = open(&dir, Route::Invoice(inv));
|
||||
shot(&mut h, "invoice-written-off");
|
||||
assert!(
|
||||
h.query_by_label_contains("Written off, entry #")
|
||||
.is_some(),
|
||||
h.query_by_label_contains("Written off, entry #").is_some(),
|
||||
"the timeline shows the write-off"
|
||||
);
|
||||
// The status chip reads its label ("Written off"), not "late".
|
||||
|
||||
@@ -892,10 +892,12 @@ fn a_write_off_is_flagged_for_the_cpa() {
|
||||
},
|
||||
);
|
||||
let want = format!("Write-off awaiting the CPA's note: Invoice {inv}");
|
||||
let said = server
|
||||
.iter()
|
||||
.find(|a| a.title == want)
|
||||
.unwrap_or_else(|| panic!("the server's list has no {want:?}: {:?}", server.iter().map(|a| &a.title).collect::<Vec<_>>()));
|
||||
let said = server.iter().find(|a| a.title == want).unwrap_or_else(|| {
|
||||
panic!(
|
||||
"the server's list has no {want:?}: {:?}",
|
||||
server.iter().map(|a| &a.title).collect::<Vec<_>>()
|
||||
)
|
||||
});
|
||||
assert_eq!(said.severity, ledger_package::Severity::Todo);
|
||||
assert!(said.prompt.contains("wanderbooks"), "{}", said.prompt);
|
||||
assert!(said.detail.contains("100.00"), "{}", said.detail);
|
||||
@@ -910,14 +912,15 @@ fn a_write_off_is_flagged_for_the_cpa() {
|
||||
.attention
|
||||
.iter()
|
||||
.find(|a| a.title == want)
|
||||
.unwrap_or_else(|| panic!("the viewer shows no {want:?}: {:?}", books.attention.iter().map(|a| &a.title).collect::<Vec<_>>()));
|
||||
.unwrap_or_else(|| {
|
||||
panic!(
|
||||
"the viewer shows no {want:?}: {:?}",
|
||||
books.attention.iter().map(|a| &a.title).collect::<Vec<_>>()
|
||||
)
|
||||
});
|
||||
assert_eq!(shown.target, Some(ledger_gui::nav::Route::Documents));
|
||||
// The viewer reads the same figures from the journal it replayed.
|
||||
let st = books
|
||||
.ledger
|
||||
.invoice_state(inv, today)
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
let st = books.ledger.invoice_state(inv, today).unwrap().unwrap();
|
||||
assert_eq!(st.status, ledger_core::DocStatus::WrittenOff);
|
||||
assert!(books.ledger.get_entry(entry).is_some());
|
||||
}
|
||||
Reference in new issue
Block a user