diff --git a/crates/ledger-cli/tests/spec_mcp.rs b/crates/ledger-cli/tests/spec_mcp.rs index ede855a..4a3bc23 100644 --- a/crates/ledger-cli/tests/spec_mcp.rs +++ b/crates/ledger-cli/tests/spec_mcp.rs @@ -896,6 +896,20 @@ fn happy_path(name: &str) -> Mcp { json!({"kind": "invoices", "status": "all"}), ); m.ok("books.document", json!({"ref": format!("invoice:{inv}")})); + // P4b S7: a bad debt, its evidence uploaded and filed with it. + let bad = m.ok( + "books.create_invoice", + json!({"party_id": customer, "date": "2026-02-03", "due_date": "2026-03-03", + "lines": [{"description": "Consulting, never paid", "amount": "400.00"}]}), + )["id"] + .as_u64() + .unwrap(); + let letter = m.upload(b"Final demand", "letter.txt", "text/plain", "document"); + m.ok( + "books.write_off_invoice", + json!({"invoice": bad, "date": "2026-03-01", "reason": "collection exhausted", + "upload_id": letter, "confirmed": true}), + ); // Fixed assets. let registered = m.ok(