ADR1-3 on routes + db files
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 17m30s

This commit is contained in:
2025-12-12 16:09:59 -08:00
parent e37a32c890
commit 117f034b2b
32 changed files with 934 additions and 812 deletions

View File

@@ -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();
});
});