Skip to content

Commit

Permalink
fix(medusa): order edit service mock get totals + fix oas
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien2p committed Sep 15, 2022
1 parent ebf3052 commit 314d170
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/medusa/src/models/order-edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,23 +136,23 @@ export class OrderEdit extends SoftDeletableEntity {
* type: string
* subtotal:
* type: integer
* description: The subtotal for line items computed from changes.
* description: The total of subtotal
* example: 8000
* discount_total:
* type: integer
* description: The total of discount
* example: 800
* shipping_total
* shipping_total:
* type: integer
* description: The total of the shipping amount
* example: 800
* gift_card_total
* gift_card_total:
* type: integer
* description: The total of the gift card amount
* example: 800
* gift_card_tax_total
* gift_card_tax_total:
* type: integer
* description: The total of the gift card amount
* description: The total of the gift card tax amount
* example: 800
* tax_total:
* type: integer
Expand Down
3 changes: 3 additions & 0 deletions packages/medusa/src/services/__mocks__/order-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export const orderEditServiceMock = {
created_by: context.loggedInUserId,
})
}),
getTotals: jest.fn().mockImplementation(() => {
return Promise.resolve({})
}),
}

const mock = jest.fn().mockImplementation(() => {
Expand Down

0 comments on commit 314d170

Please sign in to comment.