Merge pull request #1475 from medusajs/fix-cartServiceCreateLostShippingAddress

This commit is contained in:
Adrien de Peretti
2022-05-11 22:02:24 +02:00
committed by GitHub
5 changed files with 42 additions and 48 deletions

View File

@@ -98,7 +98,7 @@ Object {
"payment_authorized_at": null,
"payment_id": null,
"region_id": "test-region",
"shipping_address_id": StringMatching /\\^addr_\\*/,
"shipping_address_id": "test-shipping-address",
"type": "swap",
"updated_at": Any<String>,
},
@@ -274,7 +274,7 @@ Object {
"payment_authorized_at": null,
"payment_id": null,
"region_id": "test-region",
"shipping_address_id": StringMatching /\\^addr_\\*/,
"shipping_address_id": "test-shipping-address",
"type": "swap",
"updated_at": Any<String>,
},

View File

@@ -1,18 +1,7 @@
const path = require("path")
const {
Region,
Order,
Customer,
ShippingProfile,
Product,
ProductVariant,
MoneyAmount,
LineItem,
Payment,
Cart,
ShippingMethod,
ShippingOption,
Swap,
} = require("@medusajs/medusa")
const setupServer = require("../../../helpers/setup-server")
@@ -137,7 +126,7 @@ describe("/store/carts", () => {
type: "swap",
created_at: expect.any(String),
updated_at: expect.any(String),
shipping_address_id: expect.stringMatching(/^addr_*/),
shipping_address_id: "test-shipping-address",
metadata: {
swap_id: expect.stringMatching(/^swap_*/),
},
@@ -221,7 +210,7 @@ describe("/store/carts", () => {
cart: {
id: expect.stringMatching(/^cart_*/),
billing_address_id: "test-billing-address",
shipping_address_id: expect.stringMatching(/^addr_*/),
shipping_address_id: "test-shipping-address",
type: "swap",
created_at: expect.any(String),
updated_at: expect.any(String),