Skip to content

Commit

Permalink
Removed expectedTeam
Browse files Browse the repository at this point in the history
  • Loading branch information
kloV148 committed Feb 13, 2024
1 parent 55e9e11 commit 658fc88
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/presentation/http/router/noteSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ describe('NoteSettings API', () => {
test('Returns team with note settings by public id with 200 status', async () => {
const existingNotePublicId = 'Pq1T9vc23Q';

const expectedTeam = [
const response = await global.api?.fakeRequest({
method: 'GET',
url: `/note-settings/${existingNotePublicId}`,
});

expect(response?.statusCode).toBe(200);

expect(response?.json().team).toStrictEqual([
{
'id': 2,
'role': 0,
Expand All @@ -41,16 +48,7 @@ describe('NoteSettings API', () => {
'photo': null,
},
},
];

const response = await global.api?.fakeRequest({
method: 'GET',
url: `/note-settings/${existingNotePublicId}`,
});

expect(response?.statusCode).toBe(200);

expect(response?.json().team).toStrictEqual(expectedTeam);
]);
});

test('Returns 404 when note settings with specified note public id do not exist', async () => {
Expand Down

0 comments on commit 658fc88

Please sign in to comment.