|
|
@ -61,7 +61,6 @@ describe('Middlewares', () => {
|
|
|
|
const resMock = { locals: {} };
|
|
|
|
const resMock = { locals: {} };
|
|
|
|
middleware.exposePrivilegeSet(reqMock, resMock, () => {
|
|
|
|
middleware.exposePrivilegeSet(reqMock, resMock, () => {
|
|
|
|
assert(resMock.locals.privileges);
|
|
|
|
assert(resMock.locals.privileges);
|
|
|
|
console.log(resMock.locals.privileges);
|
|
|
|
|
|
|
|
assert.deepStrictEqual(resMock.locals.privileges, {
|
|
|
|
assert.deepStrictEqual(resMock.locals.privileges, {
|
|
|
|
chat: true,
|
|
|
|
chat: true,
|
|
|
|
'upload:post:image': true,
|
|
|
|
'upload:post:image': true,
|
|
|
|