This commit is contained in:
2026-08-08 14:41:17 +08:00
parent a3a09d1dec
commit 315c370ec9
3 changed files with 24 additions and 6 deletions
@@ -28,4 +28,10 @@ describe('customer overseas storage fee api', () => {
expect(http.put).toHaveBeenCalledWith(`/platform/v1/iam/tenants/${config.customerId}/overseas-storage-fees`, request)
expect(result.version).toBe(1)
})
it('normalizes an omitted end day as an open-ended tier', async () => {
vi.mocked(http.get).mockResolvedValue({ data: { ...config, tiers: [{ id: 1, startDay: 91, unitPrice: 2, sortNo: 5, feeType: 'STORAGE', billingUnit: 'CBM' }] } })
const result = await getCustomerOverseasStorageFees(config.customerId)
expect(result.tiers[0]?.endDay).toBeNull()
})
})