fix: Apply strict schema for all body and query parameters (#7624)

This commit is contained in:
Stevche Radevski
2024-06-05 15:40:54 +00:00
committed by GitHub
parent a39b542759
commit d2e1e9f8c7
6 changed files with 31 additions and 24 deletions
@@ -174,21 +174,16 @@ medusaIntegrationTestRunner({
describe("POST /admin/customers", () => {
it("should create a customer", async () => {
const response = await api
.post(
"/admin/customers",
{
first_name: "newf",
last_name: "newl",
email: "new@email.com",
password: "newpassword",
metadata: { foo: "bar" },
},
adminHeaders
)
.catch((err) => {
console.log(err)
})
const response = await api.post(
"/admin/customers",
{
first_name: "newf",
last_name: "newl",
email: "new@email.com",
metadata: { foo: "bar" },
},
adminHeaders
)
expect(response.status).toEqual(200)
expect(response.data.customer).toEqual(