Skip to content

Commit

Permalink
Update add-team.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mel-am committed Feb 5, 2024
1 parent 95a7126 commit 14a89fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/integration/routes/add-team.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { logger } from '../../../src/middleware/logger.middleware';
import { log } from '../../../src/utils/logger';
import { authentication } from '../../../src/middleware/authentication.middleware';

import { MOCK_REDIRECT_MESSSAGE, MOCK_POST_ADD_TEAM_RESPONSE, MOCK_GET_ADD_TEAM_RESPONSE } from '../../mock/text.mock';
import { MOCK_REDIRECT_MESSAGE as MOCK_REDIRECT_MESSAGE, MOCK_POST_ADD_TEAM_RESPONSE, MOCK_GET_ADD_TEAM_RESPONSE } from '../../mock/text.mock';
import { MOCK_POST_ADD_TEAM } from '../../mock/data';

jest.mock('../../../src/utils/logger', () => ({
Expand Down Expand Up @@ -45,7 +45,7 @@ describe('add-team endpoint integration tests', () => {
const res = await request(app).post(config.ADD_TEAM_URL).send(MOCK_POST_ADD_TEAM);

expect(res.status).toEqual(302);
expect(res.text).toContain(MOCK_REDIRECT_MESSSAGE);
expect(res.text).toContain(MOCK_REDIRECT_MESSAGE);
expect(mockedLogger).toHaveBeenCalledTimes(1);
expect(mockedAuth).toHaveBeenCalledTimes(1);
});
Expand All @@ -55,7 +55,7 @@ describe('add-team endpoint integration tests', () => {

const mockLog = log.info as jest.Mock;

expect(res.text).toContain(MOCK_REDIRECT_MESSSAGE);
expect(res.text).toContain(MOCK_REDIRECT_MESSAGE);
expect(mockLog).toBeCalledWith(MOCK_POST_ADD_TEAM_RESPONSE);
expect(mockedLogger).toHaveBeenCalledTimes(1);
expect(mockedAuth).toHaveBeenCalledTimes(1);
Expand Down

0 comments on commit 14a89fd

Please sign in to comment.