优化
This commit is contained in:
@@ -18,6 +18,17 @@ test('orders fixture verifies the complete pricing tuple before selecting an FBA
|
||||
assert.match(source, /warehouse\?\.status === 'ACTIVE'/)
|
||||
})
|
||||
|
||||
test('private addresses select an authoritative channel without requiring a warehouse destination rate row', async () => {
|
||||
const result = await findPricedOrderRouteAcrossOrigins({
|
||||
receivings: [{ id: 'origin' }], destinations: [], destinationType: 'PRIVATE',
|
||||
loadChannels: async () => ({ http: 200, body: { code: '200', data: [{ channelCode: 'C', pricingTaxModes: ['TAX_INCLUDED'] }] } }),
|
||||
estimate: async () => { throw new Error('private address is not a warehouse destination') },
|
||||
})
|
||||
assert.equal(result.priced.channel.channelCode, 'C')
|
||||
assert.equal(result.priced.destination, null)
|
||||
assert.equal(result.attempts, 0)
|
||||
})
|
||||
|
||||
test('FBA order fixture excludes warehouses without the internal code required by pallet labels', () => {
|
||||
const warehouses = [
|
||||
{ id: 'abe3', warehouseCode: 'ABE3', status: 'ACTIVE', internalCode: null },
|
||||
|
||||
Reference in New Issue
Block a user