Release 1.2.2: recover missed PrestaShop status changes
This commit is contained in:
@@ -36,7 +36,10 @@ function dependencies(overrides = {}) {
|
||||
const deps = {
|
||||
Core,
|
||||
Log: { info() {}, warn() {}, error() {} },
|
||||
PsOrder: { findOne: async () => ({ psOrderId: 21, orbitoOrderId: ORDER_ID }) },
|
||||
PsOrder: {
|
||||
findOne: async () => ({ psOrderId: 21, orbitoOrderId: ORDER_ID }),
|
||||
update: async () => ({ matchedCount: 1 }),
|
||||
},
|
||||
loadConfig: async () => ({
|
||||
apiUrl: 'https://shop.test',
|
||||
apiKey: 'secret',
|
||||
@@ -44,7 +47,8 @@ function dependencies(overrides = {}) {
|
||||
}),
|
||||
apiFor: () => ({
|
||||
setOrderState: async (...args) => {
|
||||
calls.setOrderState.push(args);
|
||||
calls.setOrderState.push(args.slice(0, 2));
|
||||
await args[2]?.beforeWrite();
|
||||
return { unchanged: false };
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user