Add new test for conflicting user email

This commit is contained in:
adrinr 2023-04-05 10:56:55 +01:00
parent 0acb821b70
commit 57a3ff96ea
1 changed files with 9 additions and 0 deletions

View File

@ -318,6 +318,15 @@ describe("scim", () => {
await postScimUser({ body }, { expect: 500 })
})
})
it("creating an existing user name returns a conflict", async () => {
const body = structures.scim.createUserRequest()
await postScimUser({ body })
const res = await postScimUser({ body }, { expect: 409 })
expect((res as any).message).toBe("Email already in use")
})
})
describe("GET /api/global/scim/v2/users/:id", () => {