Skip to content

Commit

Permalink
tried to solve issue with wrong ID tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory567 committed Aug 27, 2024
1 parent 0bc4576 commit fe6c1a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/todos.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ describe('Todos API', () => {
});
*/

test('PUT /todos/:id/done should return 400 for an invalid ID', async () => {
test('PUT /todos/:id/done should return 404 for an invalid ID', async () => {
const res = await request(app).put('/todos/invalid/done');
expect(res.statusCode).toEqual(400);
expect(res.statusCode).toEqual(404);
expect(res.text).toBe('Invalid ID');
});

test('DELETE /todos/:id/done should return 400 for an invalid ID', async () => {
test('DELETE /todos/:id/done should return 404 for an invalid ID', async () => {
const res = await request(app).delete('/todos/invalid/done');
expect(res.statusCode).toEqual(400);
expect(res.statusCode).toEqual(404);
expect(res.text).toBe('Invalid ID');
});

Expand Down

0 comments on commit fe6c1a5

Please sign in to comment.