fix(medusa): Add free shipping functionality (#241)

This commit is contained in:
Oliver Windall Juhl
2021-04-27 15:14:18 +02:00
committed by GitHub
parent 348d1c4997
commit fb0613d3cb
7 changed files with 210 additions and 41 deletions
@@ -65,7 +65,7 @@ describe("POST /store/carts/:id", () => {
expect(CartServiceMock.retrieve).toHaveBeenCalledWith(
IdMap.getId("emptyCart"),
{
relations: ["payment_sessions"],
relations: ["payment_sessions", "shipping_methods"],
}
)
expect(CartServiceMock.retrieve).toHaveBeenCalledWith(
@@ -104,7 +104,7 @@ export default async (req, res) => {
// If the cart has payment sessions update these
const updated = await cartService.retrieve(id, {
relations: ["payment_sessions"],
relations: ["payment_sessions", "shipping_methods"],
})
if (updated.payment_sessions?.length && !value.region_id) {