helpyourneighbour/backend/tests/roles.test.js
BibaBot 963d8c3aa5
Some checks are pending
Docker Test / test (push) Waiting to run
feat: Implement role-based access control middleware and tests
2026-03-17 10:09:15 +00:00

16 lines
No EOL
588 B
JavaScript

// Simple test for role middleware
const fs = require('fs');
const path = require('path');
describe('Role Middleware Tests', () => {
it('should have a role middleware file', () => {
const middlewarePath = path.join(__dirname, '../middleware/role.middleware.js');
expect(fs.existsSync(middlewarePath)).toBe(true);
});
it('should contain the requireRole function', () => {
const middlewarePath = path.join(__dirname, '../middleware/role.middleware.js');
const content = fs.readFileSync(middlewarePath, 'utf8');
expect(content).toContain('requireRole');
});
});