优化
This commit is contained in:
+11
-2
@@ -34,7 +34,7 @@ function fixture() {
|
||||
scenarios: [],
|
||||
calls,
|
||||
createdResources: {
|
||||
merchantQualificationFixture: { tenantId: '1001' },
|
||||
merchantQualificationFixture: { tenantId: '1999' },
|
||||
phase4OverseasBusiness: {
|
||||
purchase: { orderNo: 'PO-1', customerId: '1001' },
|
||||
truck: { orderNo: 'TK-1', customerId: '1001' },
|
||||
@@ -143,9 +143,18 @@ test('five fee types traverse Lastleg lifecycle and reach Finance through real H
|
||||
for (const field of ['businessId', 'orderId', 'inboundId', 'inboundCode', 'containerId', 'containerBookingId', 'containerNo']) {
|
||||
assert.equal(warehouseCreate.body[field], null, field)
|
||||
}
|
||||
assert.equal(warehouseCreate.body.customerId, '1001')
|
||||
assert.equal(warehouseCreate.body.customerId, '1999')
|
||||
assert.equal(warehouseCreate.body.warehouseId, '9001')
|
||||
|
||||
for (const [path, customerId] of [
|
||||
['/api/platform/v1/last-leg/overseas-procurements', '1001'],
|
||||
['/api/platform/v1/last-leg/us-truck-orders', '1001'],
|
||||
['/api/platform/v1/last-leg/local-looseboard-orders', '1001'],
|
||||
]) {
|
||||
const lookup = context.calls.find((call) => call.method === 'GET' && call.path.startsWith(`${path}?`))
|
||||
assert.equal(new URLSearchParams(lookup.path.split('?')[1]).get('customerId'), customerId)
|
||||
}
|
||||
|
||||
const creates = context.calls.filter((call) => call.method === 'POST'
|
||||
&& call.path === '/api/platform/v1/last-leg/finance-fee-sources')
|
||||
assert.equal(creates.length, 12)
|
||||
|
||||
Reference in New Issue
Block a user