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 fe6c1a5 commit e62b332
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/todos.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ describe('Todos API', () => {
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(404);
expect(res.text).toBe('Invalid ID');
expect(res.text).toBe('Todo not found');
});

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(404);
expect(res.text).toBe('Invalid ID');
expect(res.text).toBe('Todo not found');
});

test('POST /todos should return 400 for a name exceeding max length', async () => {
Expand Down

0 comments on commit e62b332

Please sign in to comment.