route testing refactoring using zod - ADR-003
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 16m3s
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 16m3s
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user