优化
This commit is contained in:
@@ -16,6 +16,8 @@ describe('platform container customs API', () => {
|
|||||||
it('uses the frozen customs-v1 paths and preserves long ids as strings', async () => {
|
it('uses the frozen customs-v1 paths and preserves long ids as strings', async () => {
|
||||||
const get = vi.spyOn(http, 'get').mockResolvedValue({ code: '200', message: 'ok', data: customs })
|
const get = vi.spyOn(http, 'get').mockResolvedValue({ code: '200', message: 'ok', data: customs })
|
||||||
const result = await getContainerCustoms('2092438843630391402')
|
const result = await getContainerCustoms('2092438843630391402')
|
||||||
|
expect(result).not.toBeNull()
|
||||||
|
if (!result) throw new Error('expected completed loading plan customs view')
|
||||||
expect(get).toHaveBeenCalledWith('/platform/v1/customs/loading-plans/2092438843630391402')
|
expect(get).toHaveBeenCalledWith('/platform/v1/customs/loading-plans/2092438843630391402')
|
||||||
expect(result).toMatchObject({ aggregateId: '2092438843630391401', loadingPlanId: '2092438843630391402', containerBookingId: '2092438843630391403' })
|
expect(result).toMatchObject({ aggregateId: '2092438843630391401', loadingPlanId: '2092438843630391402', containerBookingId: '2092438843630391403' })
|
||||||
expect(result.inbounds[0]).toMatchObject({ inboundId: '2092438843630391404', orderId: '2092438843630391405', tenantId: '2092438843630391406' })
|
expect(result.inbounds[0]).toMatchObject({ inboundId: '2092438843630391404', orderId: '2092438843630391405', tenantId: '2092438843630391406' })
|
||||||
|
|||||||
Reference in New Issue
Block a user