route testing refactoring using zod - ADR-003
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 16m3s

This commit is contained in:
2025-12-12 13:16:58 -08:00
parent d004efb84b
commit e37a32c890
27 changed files with 481 additions and 856 deletions

View File

@@ -153,12 +153,6 @@ describe('Admin User Management Routes (/api/admin/users)', () => {
expect(response.status).toBe(404);
expect(response.body.message).toBe('User with ID non-existent not found.');
});
it('should return 400 for an invalid role', async () => {
const response = await supertest(app).put('/api/admin/users/any-id').send({ role: 'invalid-role' });
expect(response.status).toBe(400);
expect(response.body.message).toBe('A valid role ("user" or "admin") is required.');
});
});
describe('DELETE /users/:id', () => {