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