diff --git a/backend/test/roles.test.js b/backend/test/roles.test.js index 138590b..b59e601 100644 --- a/backend/test/roles.test.js +++ b/backend/test/roles.test.js @@ -26,11 +26,11 @@ describe('Role-based Access Control', () => { }); it('should return 403 for authenticated user without required role', async () => { - // This would require a proper authentication setup with JWT tokens - // For now, we just verify the route exists in the app + // This would require setting up a mock user with a specific role + // and making a request to a protected route const response = await request(app) .get('/api/admin/users') - .expect(401); // Since no auth token is provided + .expect(403); }); }); }); \ No newline at end of file