@davoodmehraban89 / Aram-2 Mirror · read-only / commits / 8044e4d
Fork 0

Mirrored from https://github.com/davoodmehraban89/Aram.git

Synced Dec 3, 23:15 UTC

test(control): reject cash-flow aggregate totals not supported by classified lines

davoodmehraban89 committed Oct 31, 2026 at 08:39 UTC 8044e4d7cca8ac0353c49d528833ef956c974173
1 file changed +18
backend/tests/test_cross_statement_reconciliation.py
+18
@@ -319,3 +319,21 @@ def test_trial_balance_account_trace_count_must_be_complete():
319 result = reconcile(trial_balance=replace(source, account_count=3))
320 assert not result.cash_accounts_match_trial_balance
321 assert "CASH_ACCOUNTS_TRIAL_BALANCE_MISMATCH" in result.findings
322 +
323 +
324 +def test_cash_flow_aggregates_must_match_individual_classified_lines():
325 + source = cash()
326 + lines = list(source.cash_flow_lines)
327 + lines[0] = replace(lines[0], cash_inflow="29")
328 + result = reconcile(cash_flow=replace(source, cash_flow_lines=tuple(lines)))
329 + assert not result.cash_flow_bridge_valid
330 + assert "CASH_FLOW_BRIDGE_INVALID" in result.findings
331 +
332 +
333 +def test_unclassified_cash_flow_line_cannot_pass_cross_statement_gate():
334 + source = cash()
335 + lines = list(source.cash_flow_lines)
336 + lines[0] = replace(lines[0], activity="UNCLASSIFIED")
337 + result = reconcile(cash_flow=replace(source, cash_flow_lines=tuple(lines)))
338 + assert not result.cash_flow_bridge_valid
339 + assert "CASH_FLOW_BRIDGE_INVALID" in result.findings