mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 23:35:42 +00:00
baseLiters
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user