From 0e51fa861cb4ce8707ad2106ad5204f0a5c41706 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 17 May 2024 11:35:29 +0200 Subject: [PATCH] fix: refs #6598 drop variables --- back/methods/vn-user/specs/acls.spec.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/back/methods/vn-user/specs/acls.spec.js b/back/methods/vn-user/specs/acls.spec.js index 486d23bca..0349b39fb 100644 --- a/back/methods/vn-user/specs/acls.spec.js +++ b/back/methods/vn-user/specs/acls.spec.js @@ -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(); }); });