Add test validating not overriding scim users

This commit is contained in:
Adria Navarro 2024-02-26 16:53:25 +01:00
parent 6226075dcd
commit 0212f2851f
1 changed files with 24 additions and 0 deletions

View File

@ -413,6 +413,30 @@ describe("scim", () => {
expect(res).toEqual(expectedScimUser)
})
it("a user cannot be SCIM synchronised with another SCIM user", async () => {
const { body: internalUser } = await config.api.users.saveUser(
structures.users.user()
)
await postScimUser(
{
body: structures.scim.createUserRequest({
email: internalUser.email,
}),
},
{ expect: 200 }
)
await postScimUser(
{
body: structures.scim.createUserRequest({
email: internalUser.email,
}),
},
{ expect: 409 }
)
})
})
describe("GET /api/global/scim/v2/users/:id", () => {