43 lines
1.5 KiB
Plaintext
43 lines
1.5 KiB
Plaintext
|
|
> backend@1.5.1 test D:\nap-dms.lcbp3\backend
|
|
> jest "src/common/auth/casl/ability.factory.spec.ts"
|
|
|
|
FAIL src/common/auth/casl/ability.factory.spec.ts
|
|
AbilityFactory
|
|
√ should be defined (12 ms)
|
|
Global Admin
|
|
× should grant all permissions for global admin (4 ms)
|
|
Organization Level
|
|
√ should grant permissions for matching organization (3 ms)
|
|
√ should deny permissions for non-matching organization (2 ms)
|
|
Project Level
|
|
√ should grant permissions for matching project (3 ms)
|
|
Contract Level
|
|
√ should grant permissions for matching contract (2 ms)
|
|
Multiple Assignments
|
|
√ should combine permissions from multiple assignments (2 ms)
|
|
|
|
● AbilityFactory › Global Admin › should grant all permissions for global admin
|
|
|
|
expect(received).toBe(expected) // Object.is equality
|
|
|
|
Expected: true
|
|
Received: false
|
|
|
|
34 | const ability = factory.createForUser(user, {});
|
|
35 |
|
|
> 36 | expect(ability.can('manage', 'all')).toBe(true);
|
|
| ^
|
|
37 | });
|
|
38 | });
|
|
39 |
|
|
|
|
at Object.<anonymous> (common/auth/casl/ability.factory.spec.ts:36:44)
|
|
|
|
Test Suites: 1 failed, 1 total
|
|
Tests: 1 failed, 6 passed, 7 total
|
|
Snapshots: 0 total
|
|
Time: 1.168 s, estimated 2 s
|
|
Ran all test suites matching src/common/auth/casl/ability.factory.spec.ts.
|
|
ΓÇëELIFECYCLEΓÇë Test failed. See above for more details.
|