Test get group without members

This commit is contained in:
adrinr 2023-04-14 15:14:41 +01:00
parent f3e6295892
commit c83cf33707
2 changed files with 15 additions and 2 deletions

View File

@ -715,6 +715,16 @@ describe("scim", () => {
status: 404,
})
})
it("should allow excluding members", async () => {
const response = await findScimGroup(group.id, {
qs: "excludedAttributes=members",
})
const { members, ...expectedResponse } = group
expect(response).toEqual(expectedResponse)
})
})
describe("DELETE /api/global/scim/v2/groups/:id", () => {

View File

@ -58,9 +58,12 @@ export class ScimGroupsAPI extends ScimTestAPI {
return res.body as ScimGroupResponse
}
find = async (id: string, requestSettings?: Partial<RequestSettings>) => {
find = async (
id: string,
requestSettings?: Partial<RequestSettings> & { qs?: string }
) => {
const res = await this.call(
`/api/global/scim/v2/groups/${id}`,
`/api/global/scim/v2/groups/${id}?${requestSettings?.qs}`,
"get",
requestSettings
)