This commit is contained in:
seb
2026-10-21 11:55:21 +02:00
parent e085bcaeba
commit eb1e9e2eb9
8 changed files with 67 additions and 42 deletions

View File

@@ -269,8 +269,12 @@ async function run() {
],
});
const testCarrier = await store.carrier.create(googleAuthId, { name: 'Test Carrier', hasPackages: true });
const testShipping = { carrierId: testCarrier.id, type: 'parcel', state: 'draft' };
const shipment = await store.shipment.create(googleAuthId, {
orderId: order2.id,
shipping: testShipping,
lines: [{ sku: 'SKU-ABC', amount: 3 }],
});
@@ -358,6 +362,7 @@ async function run() {
const shipment3 = await store.shipment.create(googleAuthId, {
orderId: order3.id,
shipping: testShipping,
lines: [
{ sku: 'SKU-ABC', amount: 4 },
{ sku: 'SKU-ABC', amount: -1 },
@@ -419,6 +424,7 @@ async function run() {
await assert.rejects(
async () => store.shipment.create(googleAuthId, {
orderId: guardOrder.id,
shipping: testShipping,
warehouseId: wh1.id,
lines: [{ sku: article.sku, amount: curStock + 10 }],
}),