baseLiters

This commit is contained in:
Marshal
2026-08-12 13:29:31 +00:00
parent ddcdcab518
commit dd39c2be7c
2 changed files with 17 additions and 0 deletions

View File

@@ -118,6 +118,19 @@ describe('RateChangeRequestsService', () => {
expect(request.payload).toEqual({ destinationYardId: 'yard-c' });
});
it('carries baseLiters — a switch to PER_LITER keeps its billing base', async () => {
const { service } = build({
rate: liveRate({ rateUnit: 'PER_WAGON', baseLiters: null }),
});
const request = await service.submit({
rateId: 'rate-1',
update: { rateUnit: 'PER_LITER', baseLiters: 3 },
});
expect(request.payload).toEqual({ rateUnit: 'PER_LITER', baseLiters: 3 });
});
it('rejects a no-op — 100 posted against a live 100.0000 is not a change', async () => {
const { service } = build();
await expect(