diff --git a/packages/worker/src/api/routes/global/tests/scim.spec.ts b/packages/worker/src/api/routes/global/tests/scim.spec.ts index 77e9cbea26..91675a12b8 100644 --- a/packages/worker/src/api/routes/global/tests/scim.spec.ts +++ b/packages/worker/src/api/routes/global/tests/scim.spec.ts @@ -600,6 +600,25 @@ describe("scim", () => { totalResults: 1, }) }) + + it("can fetch groups excluding members", async () => { + const response = await getScimGroups({ + params: { excludedAttributes: "members" }, + }) + + expect(response).toEqual({ + Resources: expect.arrayContaining( + groups.map(g => { + const { members, ...groupData } = g + return groupData + }) + ), + itemsPerPage: 25, + schemas: ["urn:ietf:params:scim:api:messages:2.0:ListResponse"], + startIndex: 1, + totalResults: groupCount, + }) + }) }) })