From 3a8ae6334c4171bc2e59a9f0f6b678b48bdbd55d Mon Sep 17 00:00:00 2001 From: RemEx <74838147+Rem7474@users.noreply.github.com> Date: Fri, 11 Sep 2026 19:40:46 +0000 Subject: [PATCH] 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). --- server/tests/unit/nest/budget.service.calc.test.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/tests/unit/nest/budget.service.calc.test.ts b/server/tests/unit/nest/budget.service.calc.test.ts index 8c57c804d..9b53a5d52 100644 --- a/server/tests/unit/nest/budget.service.calc.test.ts +++ b/server/tests/unit/nest/budget.service.calc.test.ts @@ -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 }); }); });