fix(medusa): fix update promotion's request type (#8966)

Fix the validator of the update promotion API route to match the update workflow input's type.
This commit is contained in:
Shahed Nasser
2024-09-03 18:08:22 +03:00
committed by GitHub
parent 58f297cc75
commit 423583e06c
3 changed files with 1 additions and 23 deletions

View File

@@ -495,24 +495,6 @@ medusaIntegrationTestRunner({
)
})
it("should throw an error when both campaign and campaign_id params are passed", async () => {
const { response } = await api
.post(
`/admin/promotions/${promotion.id}`,
{
campaign: { name: "test campaign" },
campaign_id: "test",
},
adminHeaders
)
.catch((e) => e)
expect(response.status).toEqual(400)
expect(response.data.message).toContain(
`Invalid request: Field 'campaign, campaign_identifier' is required`
)
})
it("should update a promotion successfully", async () => {
const response = await api.post(
`/admin/promotions/${promotion.id}`,