// 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'); }); });