7596-devToTest_2426 #2600

Merged
alexm merged 115 commits from 7596-devToTest_2426 into test 2024-06-18 06:19:51 +00:00
1 changed files with 5 additions and 14 deletions
Showing only changes of commit 0e51fa861c - Show all commits

View File

@ -3,29 +3,20 @@ const id = {administrative: 5, employee: 1, productionBoss: 50};
describe('VnUser acls()', () => {
it('should get its owns acls', async() => {
const hasAdministrativeAcls = await hasAcl('administrative', id.administrative);
const hasProductionBossAcls = await hasAcl('productionBoss', id.productionBoss);
expect(hasAdministrativeAcls).toBeTruthy();
expect(hasProductionBossAcls).toBeTruthy();
expect(await hasAcl('administrative', id.administrative)).toBeTruthy();
expect(await hasAcl('productionBoss', id.productionBoss)).toBeTruthy();
});
it('should not get administrative acls', async() => {
const hasAdministrativeAcls = await hasAcl('administrative', id.employee);
expect(hasAdministrativeAcls).toBeFalsy();
expect(await hasAcl('administrative', id.employee)).toBeFalsy();
});
it('should get the $authenticated acls', async() => {
const hasAuthAcls = await hasAcl('$authenticated', id.employee);
expect(hasAuthAcls).toBeTruthy();
expect(await hasAcl('$authenticated', id.employee)).toBeTruthy();
});
it('should get the $everyone acls', async() => {
const hasEveryoneAcls = await hasAcl('$everyone', id.employee);
expect(hasEveryoneAcls).toBeTruthy();
expect(await hasAcl('$everyone', id.employee)).toBeTruthy();
});
});