Skip to content

Commit

Permalink
fix(medusa): improve list shipping option (#2383)
Browse files Browse the repository at this point in the history
  • Loading branch information
srindom authored Oct 7, 2022
1 parent d8a5942 commit 46bd861
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ describe("GET /store/shipping-options", () => {
})

it("calls CartService retrieve", () => {
expect(CartServiceMock.retrieve).toHaveBeenCalledTimes(1)
expect(CartServiceMock.retrieve).toHaveBeenCalledWith(
expect(CartServiceMock.retrieveWithTotals).toHaveBeenCalledTimes(1)
expect(CartServiceMock.retrieveWithTotals).toHaveBeenCalledWith(
IdMap.getId("emptyCart"),
{
select: ["subtotal"],
relations: [
"region",
"items",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ export default async (req, res) => {
"shippingProfileService"
)

const cart = await cartService.retrieve(cart_id, {
select: ["subtotal"],
const cart = await cartService.retrieveWithTotals(cart_id, {
relations: [
"region",
"items",
Expand Down

0 comments on commit 46bd861

Please sign in to comment.