This commit is contained in:
2026-09-29 17:56:00 +08:00
parent 4ead51a5fe
commit 2bf4353b1b
46 changed files with 481 additions and 638 deletions
@@ -19,9 +19,9 @@ describe('Admin pallet warehouse routing contract', () => {
})
it('never calls the nonexistent overseas warehouse-admin root and always scopes pallet calls by warehouseId', () => {
expect(palletsApi).not.toMatch(/overseasHttp\.get[^\n]*\(\s*['"]\/platform\/v1\/warehouse-admin['"]/)
expect(palletsApi).not.toMatch(/http\.get[^\n]*\(\s*['"]\/platform\/v1\/warehouse-admin['"]/)
expect(palletsApi).not.toContain('listCustomerWarehouses')
expect(palletsApi).toContain('`/platform/v1/warehouse-admin/${encodeURIComponent(warehouseId)}/pallets`')
expect(palletsApi).toContain('`/platform/v1/warehouse-admin/${encodeURIComponent(warehouseId)}/pallets/${encodeURIComponent(palletId)}`')
expect(palletsApi).toContain('`/platform/v1/overseas-warehouse-resources/${encodeURIComponent(warehouseId)}/pallets`')
expect(palletsApi).toContain('`/platform/v1/overseas-warehouse-resources/${encodeURIComponent(warehouseId)}/pallets/${encodeURIComponent(palletId)}`')
})
})