ADR1-3 on routes + db files
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 17m30s
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 17m30s
This commit is contained in:
@@ -166,7 +166,7 @@ describe('Admin User Management Routes (/api/admin/users)', () => {
|
||||
it('should prevent an admin from deleting their own account', async () => {
|
||||
const response = await supertest(app).delete(`/api/admin/users/${adminUser.user_id}`);
|
||||
expect(response.status).toBe(400);
|
||||
expect(response.body.message).toBe('Admins cannot delete their own account.');
|
||||
expect(response.body.message).toBe('Admins cannot delete their own account.'); // This is now handled by the errorHandler
|
||||
expect(mockedDb.userRepo.deleteUserById).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user