Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve access service #4689

Merged
merged 17 commits into from
Sep 19, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/test/e2e/services/access-service.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,21 @@
permissions.CREATE_FEATURE,
'*',
);
expect(
await accessService.hasPermission(user, CREATE_FEATURE, 'default'),
).toBe(true);

await accessService.removePermissionFromRole(
editRole.id,
permissions.CREATE_FEATURE,
'*',
);

expect(
await accessService.hasPermission(user, CREATE_FEATURE, 'default'),
).toBe(false);

Check failure on line 378 in src/test/e2e/services/access-service.e2e.test.ts

View workflow job for this annotation

GitHub Actions / Unit Tests

src/test/e2e/services/access-service.e2e.test.ts ► -should remove CREATE_FEATURE on default environment ► -should remove CREATE_FEATURE on default environment

Failed test found in: jest-junit.xml Error: Error: expect(received).toBe(expected) // Object.is equality
Raw output
Error: expect(received).toBe(expected) // Object.is equality

Expected: false
Received: true
    at Object.toBe (/home/runner/work/unleash/unleash/src/test/e2e/services/access-service.e2e.test.ts:378:7)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

// if project does not exist we also return false
expect(
await accessService.hasPermission(user, CREATE_FEATURE, 'some-project'),
).toBe(false);
Expand Down
Loading