test(cli): the TIN-file refusals compare the raw journal on both sides

The journal taken before the refusals was raw (frame lines in) and the one
taken after still dropped frame lines, so the two could never match after
T1. Both are raw now, with no filter for closing lines: a refused call
leaves no begun line, no line, and no closing line with an error text.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-21 11:42:22 -07:00
1 parent 1ad6d9e41c
commit bc55a10101
1 file changed
+5 -11
+5 -11
View File
@@ -805,18 +805,12 @@ fn tin_bearing_files_are_refused_when_given_back_to_be_filed() {
);
}
}
// (Each upload begun is a call, with its closing line: those only.)
let calls_only = |j: Vec<u8>| -> Vec<String> {
String::from_utf8(j)
.unwrap()
.lines()
.filter(|l| !l.contains(r#""type":"call.closed""#))
.map(str::to_string)
.collect()
};
// Raw bytes, frame lines included: an upload slot writes no line, and a
// refusal is decided before anything is written, so no frame (begun or
// closed, with its error text) stands for any of these calls.
assert_eq!(
calls_only(books.journal()),
calls_only(journal),
books.journal_raw(),
journal,
"a refusal stored something"
);
// Without TINs, the 1099 worksheet is an ordinary file: it may be