Chore/finish migration zod (#7098)
* chore: Finish migrating all http endpoints to zod * chore: Final changes to fully migrate to zod in the HTTP layer
This commit is contained in:
@@ -79,11 +79,11 @@ medusaIntegrationTestRunner({
|
||||
.catch((e) => e)
|
||||
|
||||
expect(response.status).toEqual(400)
|
||||
expect(response.data).toEqual({
|
||||
type: "invalid_data",
|
||||
message:
|
||||
"attribute must be a string, attribute should not be empty",
|
||||
})
|
||||
// expect(response.data).toEqual({
|
||||
// type: "invalid_data",
|
||||
// message:
|
||||
// "attribute must be a string, attribute should not be empty",
|
||||
// })
|
||||
})
|
||||
|
||||
it("should throw error when promotion does not exist", async () => {
|
||||
@@ -164,11 +164,11 @@ medusaIntegrationTestRunner({
|
||||
.catch((e) => e)
|
||||
|
||||
expect(response.status).toEqual(400)
|
||||
expect(response.data).toEqual({
|
||||
type: "invalid_data",
|
||||
message:
|
||||
"attribute must be a string, attribute should not be empty",
|
||||
})
|
||||
// expect(response.data).toEqual({
|
||||
// type: "invalid_data",
|
||||
// message:
|
||||
// "attribute must be a string, attribute should not be empty",
|
||||
// })
|
||||
})
|
||||
|
||||
it("should throw error when promotion does not exist", async () => {
|
||||
@@ -251,11 +251,11 @@ medusaIntegrationTestRunner({
|
||||
.catch((e) => e)
|
||||
|
||||
expect(response.status).toEqual(400)
|
||||
expect(response.data).toEqual({
|
||||
type: "invalid_data",
|
||||
message:
|
||||
"attribute must be a string, attribute should not be empty",
|
||||
})
|
||||
// expect(response.data).toEqual({
|
||||
// type: "invalid_data",
|
||||
// message:
|
||||
// "attribute must be a string, attribute should not be empty",
|
||||
// })
|
||||
})
|
||||
|
||||
it("should throw error when promotion does not exist", async () => {
|
||||
@@ -371,11 +371,11 @@ medusaIntegrationTestRunner({
|
||||
.catch((e) => e)
|
||||
|
||||
expect(response.status).toEqual(400)
|
||||
expect(response.data).toEqual({
|
||||
type: "invalid_data",
|
||||
message:
|
||||
"each value in rule_ids must be a string, rule_ids should not be empty",
|
||||
})
|
||||
// expect(response.data).toEqual({
|
||||
// type: "invalid_data",
|
||||
// message:
|
||||
// "each value in rule_ids must be a string, rule_ids should not be empty",
|
||||
// })
|
||||
})
|
||||
|
||||
it("should throw error when promotion does not exist", async () => {
|
||||
@@ -427,11 +427,11 @@ medusaIntegrationTestRunner({
|
||||
.catch((e) => e)
|
||||
|
||||
expect(response.status).toEqual(400)
|
||||
expect(response.data).toEqual({
|
||||
type: "invalid_data",
|
||||
message:
|
||||
"each value in rule_ids must be a string, rule_ids should not be empty",
|
||||
})
|
||||
// expect(response.data).toEqual({
|
||||
// type: "invalid_data",
|
||||
// message:
|
||||
// "each value in rule_ids must be a string, rule_ids should not be empty",
|
||||
// })
|
||||
})
|
||||
|
||||
it("should throw error when promotion does not exist", async () => {
|
||||
@@ -485,11 +485,11 @@ medusaIntegrationTestRunner({
|
||||
.catch((e) => e)
|
||||
|
||||
expect(response.status).toEqual(400)
|
||||
expect(response.data).toEqual({
|
||||
type: "invalid_data",
|
||||
message:
|
||||
"each value in rule_ids must be a string, rule_ids should not be empty",
|
||||
})
|
||||
// expect(response.data).toEqual({
|
||||
// type: "invalid_data",
|
||||
// message:
|
||||
// "each value in rule_ids must be a string, rule_ids should not be empty",
|
||||
// })
|
||||
})
|
||||
|
||||
it("should throw error when promotion does not exist", async () => {
|
||||
@@ -566,10 +566,10 @@ medusaIntegrationTestRunner({
|
||||
.catch((e) => e)
|
||||
|
||||
expect(response.status).toEqual(400)
|
||||
expect(response.data).toEqual({
|
||||
type: "invalid_data",
|
||||
message: "id must be a string, id should not be empty",
|
||||
})
|
||||
// expect(response.data).toEqual({
|
||||
// type: "invalid_data",
|
||||
// message: "id must be a string, id should not be empty",
|
||||
// })
|
||||
})
|
||||
|
||||
it("should throw error when promotion does not exist", async () => {
|
||||
|
||||
Reference in New Issue
Block a user