fix(medusa): improve list shipping option (#2383)

This commit is contained in:
Sebastian Rindom
2022-10-07 15:43:03 +02:00
committed by GitHub
parent d8a5942d3d
commit 46bd861c2a
2 changed files with 3 additions and 5 deletions
@@ -19,11 +19,10 @@ describe("GET /store/shipping-options", () => {
}) })
it("calls CartService retrieve", () => { it("calls CartService retrieve", () => {
expect(CartServiceMock.retrieve).toHaveBeenCalledTimes(1) expect(CartServiceMock.retrieveWithTotals).toHaveBeenCalledTimes(1)
expect(CartServiceMock.retrieve).toHaveBeenCalledWith( expect(CartServiceMock.retrieveWithTotals).toHaveBeenCalledWith(
IdMap.getId("emptyCart"), IdMap.getId("emptyCart"),
{ {
select: ["subtotal"],
relations: [ relations: [
"region", "region",
"items", "items",
@@ -55,8 +55,7 @@ export default async (req, res) => {
"shippingProfileService" "shippingProfileService"
) )
const cart = await cartService.retrieve(cart_id, { const cart = await cartService.retrieveWithTotals(cart_id, {
select: ["subtotal"],
relations: [ relations: [
"region", "region",
"items", "items",