Add test validating not overriding scim users

This commit is contained in:
Adria Navarro 2024-02-26 16:53:25 +01:00
parent 67b9201fbe
commit 3aba6e70aa
2 changed files with 25 additions and 1 deletions

@ -1 +1 @@
Subproject commit f78c3380700ad71b40d64fc6de6097b39143dbd9
Subproject commit ec9dd27aee79f206e595d36a438ca17efdcfde40

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", () => {