fix(core-flows): cart validate sales channel (#11024)
This commit is contained in:
@@ -313,32 +313,6 @@ medusaIntegrationTestRunner({
|
||||
)
|
||||
})
|
||||
|
||||
it("should throw when required fields of a cart are not present", async () => {
|
||||
cart = (
|
||||
await api.post(
|
||||
`/store/carts`,
|
||||
{
|
||||
region_id: region.id,
|
||||
currency_code: "usd",
|
||||
sales_channel_id: null,
|
||||
email: "test@admin.com",
|
||||
items: [],
|
||||
},
|
||||
storeHeaders
|
||||
)
|
||||
).data.cart
|
||||
|
||||
const { response } = await api
|
||||
.get(`/store/shipping-options?cart_id=${cart.id}`, storeHeaders)
|
||||
.catch((e) => e)
|
||||
|
||||
expect(response.data).toEqual({
|
||||
type: "invalid_data",
|
||||
message:
|
||||
"Field(s) are required to have value to continue - sales_channel_id",
|
||||
})
|
||||
})
|
||||
|
||||
it("should throw error when cart_id is not passed as a parameter", async () => {
|
||||
const { response } = await api
|
||||
.get(`/store/shipping-options`, storeHeaders)
|
||||
|
||||
Reference in New Issue
Block a user