1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

Add tests

This commit is contained in:
adrinr 2023-03-14 11:49:39 +01:00
parent fbd53d5fd3
commit 829aee1f68

View file

@ -310,7 +310,7 @@ describe("/api/global/scim/v2/users", () => {
})
it("unauthorised calls are not allowed", async () => {
const response = await deleteScimUser({} as any, {
const response = await deleteScimUser(user.id, {
setHeaders: false,
expect: 403,
})
@ -320,7 +320,7 @@ describe("/api/global/scim/v2/users", () => {
it("cannot be called when feature is disabled", async () => {
mocks.licenses.useCloudFree()
const response = await deleteScimUser({} as any, { expect: 400 })
const response = await deleteScimUser(user.id, { expect: 400 })
expect(response).toEqual(featureDisabledResponse)
})
@ -332,5 +332,9 @@ describe("/api/global/scim/v2/users", () => {
await config.api.scimUsersAPI.find(user.id, { expect: 404 })
})
it("an non existing user can not be deleted", async () => {
await deleteScimUser(structures.uuid(), { expect: 404 })
})
})
})