From 1301b23f028d7564c8e0f88885d18a47c12feb05 Mon Sep 17 00:00:00 2001 From: adrinr Date: Fri, 14 Apr 2023 14:36:06 +0100 Subject: [PATCH] Add group filter fetch --- .../src/api/routes/global/tests/scim.spec.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 3352951152..77e9cbea26 100644 --- a/packages/worker/src/api/routes/global/tests/scim.spec.ts +++ b/packages/worker/src/api/routes/global/tests/scim.spec.ts @@ -585,6 +585,21 @@ describe("scim", () => { totalResults: groupCount, }) }) + + it("can fetch groups using displayName filters", async () => { + const groupToFetch = _.sample(groups) + const response = await getScimGroups({ + params: { filter: `displayName eq "${groupToFetch!.displayName}"` }, + }) + + expect(response).toEqual({ + Resources: [groupToFetch], + itemsPerPage: 1, + schemas: ["urn:ietf:params:scim:api:messages:2.0:ListResponse"], + startIndex: 1, + totalResults: 1, + }) + }) }) })