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:
swaits committed 2026-10-27 12:44:45 -06:00
1 parent f31dd2640b
commit 22cdfcf34b
9 files changed
+75 -50

No files matched your search

+18 -4
View File
@@ -87,7 +87,12 @@ fn write_off_then_recovery() {
}),
);
// The write-off's evidence, uploaded as an agent uploads it (D-46).
let upload = wire.upload(LETTER, "collection-letter.pdf", "application/pdf", "document");
let upload = wire.upload(
LETTER,
"collection-letter.pdf",
"application/pdf",
"document",
);
let out = ok(
&mut wire,
"books.write_off_invoice",
@@ -110,7 +115,10 @@ fn write_off_then_recovery() {
// invoice: get_entry shows the one, the document's timeline the other.
let got = ok(&mut wire, "books.get_entry", json!({ "entry_id": entry }));
assert_eq!(got["receipts"].as_array().map(Vec::len), Some(1), "{got}");
assert_eq!(got["receipts"][0]["file_name"], json!("collection-letter.pdf"));
assert_eq!(
got["receipts"][0]["file_name"],
json!("collection-letter.pdf")
);
let doc = ok(
&mut wire,
"books.document",
@@ -225,6 +233,12 @@ fn write_off_needs_evidence() {
json!({ "attachment_id": attachment }),
);
let links = receipt["links"].as_array().cloned().unwrap_or_default();
assert!(links.iter().any(|l| l["kind"] == json!("invoice")), "{receipt}");
assert!(links.iter().any(|l| l["kind"] == json!("entry")), "{receipt}");
assert!(
links.iter().any(|l| l["kind"] == json!("invoice")),
"{receipt}"
);
assert!(
links.iter().any(|l| l["kind"] == json!("entry")),
"{receipt}"
);
}