Skip to content

Commit

Permalink
feat(DTFS2-7049): removed BadRequestException tests moving payload to…
Browse files Browse the repository at this point in the history
… object instead of array
  • Loading branch information
avaitonis committed May 24, 2024
1 parent 71e44ff commit 3bb8d71
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/modules/emails/emails.controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,5 @@ describe('EmailsController', () => {
expect(runTest()).toThrow(BadRequestException);
expect(runTest()).toThrow('Header "govUkNotifyKey" is required');
});

it('throws BadRequestException exception if body is empty array', () => {
const runTest = () => () => controller.postEmail(govUkNotifyKey, []);

expect(runTest()).toThrow(BadRequestException);
expect(runTest()).toThrow('Request payload is empty');
});

it('throws BadRequestException exception if header govUkNotifyKey is missing and body is empty array', () => {
const runTest = () => () => controller.postEmail(null, []);

expect(runTest()).toThrow(BadRequestException);
expect(runTest()).toThrow('Header "govUkNotifyKey" is required');
});
});
});

0 comments on commit 3bb8d71

Please sign in to comment.