test(budget): match applySettlementUpdate's new settled_at SQL args

The unit test mocking db.run for applySettlementUpdate asserted the exact
positional argument list, which the settled_at column added two more
positions to (its CASE-WHEN flag and value, mirroring currency/exchange_rate).
This commit is contained in:
RemEx
2026-09-11 19:40:46 +00:00
committed by Maurice
parent bd46089450
commit 3a8ae6334c
@@ -837,9 +837,10 @@ describe('applySettlementUpdate', () => {
});
const res = budget.applySettlementUpdate(7, 1, { from_user_id: 2, to_user_id: 1, amount: 10.126 });
// from, to, rounded amount, currency-flag(0)/value(null), rate-flag(null)/value(1), id.
// No currency/exchange_rate passed → both CASE guards keep the existing columns.
expect(run).toHaveBeenCalledWith(2, 1, 10.13, 0, null, null, 1, 7);
// from, to, rounded amount, currency-flag(0)/value(null), rate-flag(null)/value(1),
// settled_at-flag(0)/value(null), id.
// No currency/exchange_rate/settled_at passed → all three CASE guards keep the existing columns.
expect(run).toHaveBeenCalledWith(2, 1, 10.13, 0, null, null, 1, 0, null, 7);
expect(res).toMatchObject({ id: 7, from_user_id: 2, to_user_id: 1, amount: 10.13 });
});
});