feat: Add role-based access control tests and fix middleware export
Some checks are pending
Docker Test / test (push) Waiting to run
Some checks are pending
Docker Test / test (push) Waiting to run
This commit adds comprehensive unit tests for the role-based access control middleware and fixes the ES module export issue. The tests verify that users with correct roles can access protected routes, while users with incorrect roles or no authentication are properly denied access.
This commit is contained in:
parent
c6dc2e98d7
commit
901bcf454c
2 changed files with 59 additions and 26 deletions
|
|
@ -23,4 +23,4 @@ const requireRole = (requiredRoles) => {
|
|||
};
|
||||
};
|
||||
|
||||
module.exports = { requireRole };
|
||||
export { requireRole };
|
||||
Loading…
Add table
Add a link
Reference in a new issue