feat(core-flow, medusa): Create cart with Sales Channel (#6427)

This commit is contained in:
Oli Juhl
2024-02-19 09:42:11 +01:00
committed by GitHub
parent 5db3ec09e2
commit 680dfcdad3
5 changed files with 85 additions and 23 deletions

View File

@@ -225,6 +225,21 @@ describe("Store Carts API", () => {
).rejects.toThrow()
})
it("should throw if sales channel is disabled", async () => {
const api = useApi() as any
const salesChannel = await scModuleService.create({
name: "Webshop",
is_disabled: true,
})
await expect(
api.post(`/store/carts`, {
sales_channel_id: salesChannel.id,
})
).rejects.toThrow()
})
describe("compensation", () => {
it("should delete created customer if cart-creation fails", async () => {
expect.assertions(2)