Skip to content

Commit

Permalink
fix(rbac): add test for 0 members in group (janus-idp#1189)
Browse files Browse the repository at this point in the history
  • Loading branch information
divyanshiGupta authored Feb 8, 2024
1 parent 3d1a047 commit afebb56
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/rbac/src/utils/create-role-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ describe('getMembersCount', () => {
expect(result).toBe(2);
});

it('should return 0 if there are no members in the group', () => {
const group = mockMembers[1];

const result = getMembersCount(group);

expect(result).toBe(0);
});

it('should return undefined for non-group entities', () => {
const user = mockMembers[2];

Expand Down

0 comments on commit afebb56

Please sign in to comment.