From 38d460d39ed45c27d92d07598037494c84fe6720 Mon Sep 17 00:00:00 2001 From: ikethecoder Date: Mon, 21 Mar 2022 23:50:44 -0700 Subject: [PATCH] fix unit test --- src/mocks/handlers/data/keycloak.yaml | 2 +- src/test/services/org-groups/org-group.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mocks/handlers/data/keycloak.yaml b/src/mocks/handlers/data/keycloak.yaml index c8b13e9f7..107fa0fa0 100644 --- a/src/mocks/handlers/data/keycloak.yaml +++ b/src/mocks/handlers/data/keycloak.yaml @@ -255,7 +255,7 @@ clientPermissions: id: b444a5a1-8e14-4f92-9005-8b476b977e25 permissions: - id: 0d793387-6617-4cb4-87a3-76478c368849 - name: orgcontrol permission for role data-custodian + name: Access to 'orgcontrol' services for role data-custodian type: scope logic: POSITIVE decisionStrategy: UNANIMOUS diff --git a/src/test/services/org-groups/org-group.test.ts b/src/test/services/org-groups/org-group.test.ts index e572434f6..55c83b0a4 100644 --- a/src/test/services/org-groups/org-group.test.ts +++ b/src/test/services/org-groups/org-group.test.ts @@ -31,7 +31,7 @@ describe('Org Group Access Service', function () { parent: '/data-custodian/ministry-citizens-services', }; const name = kc.getGroupPermissionName(orgGroup, 'res123'); - expect(name).toBe('res123 permission for role data-custodian'); + expect(name).toBe("Access to 'res123' services for role data-custodian"); }); it('it should getValidRoles', async function () { @@ -238,7 +238,7 @@ describe('Org Group Access Service', function () { o(result); expect(result.length).toBe(1); expect(result[0].name).toBe( - 'orgcontrol permission for role data-custodian' + "Access to 'orgcontrol' services for role data-custodian" ); expect(result[0].config.policies[0].name).toBe( 'group-data-custodian-ministry-citizens-services-databc-policy'