Skip to content

Commit

Permalink
Update app.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
PT000 authored Sep 2, 2022
1 parent ab5725e commit 93f12da
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test('get persons', () => {
seedDb(db);
const res = await request(app).get('/');
const response = [
{ name: 'Jane', id: 1, age: 1 }
{ name: 'Anna', id: 1, age: 1 }
]
expect(res.status).toBe(200);
expect(res.body).toEqual(response);
Expand All @@ -27,11 +27,11 @@ test('add person', () => {
seedDb(db);
await request(app)
.post('/')
.send({ name: 'Joe', age: 2 });
.send({ name: 'John', age: 2 });
const res = await request(app).get('/');
const response = [
{ name: 'Jane', id: 1, age: 1 },
{ name: 'Joe', id: 2, age: 2 }
{ name: 'Anna', id: 1, age: 1 },
{ name: 'John', id: 2, age: 2 }
]
expect(res.status).toBe(200);
expect(res.body).toEqual(response);
Expand All @@ -42,7 +42,7 @@ test('update person', () => {
seedDb(db);
await request(app)
.put('/1')
.send({ name: 'Joe', age: 2 });
.send({ name: 'John', age: 2 });
const res = await request(app).get('/');
const response = [
{ name: 'Jane', id: 1, age: 1 }
Expand Down

0 comments on commit 93f12da

Please sign in to comment.