Skip to content

Commit

Permalink
modified tests to include new rejection message
Browse files Browse the repository at this point in the history
  • Loading branch information
odracir04 committed Nov 29, 2023
1 parent 01aa8f1 commit bef70d2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/end-to-end/review.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,14 +402,12 @@ describe("Company application review endpoint test", () => {

test("Should send rejection email to company email", async () => {

const reason = "Some reason which is valid";
const res = await test_agent
.post(`/applications/company/${application._id}/reject`)
.send({ rejectReason: "Some reason which is valid" });

.send({ rejectReason: reason });
expect(res.status).toBe(HTTPStatus.OK);

const emailOptions = REJECTION_NOTIFICATION(application.companyName);

const emailOptions = REJECTION_NOTIFICATION(application.companyName, reason);
expect(EmailService.sendMail).toHaveBeenCalledWith({
subject: emailOptions.subject,
to: application.email,
Expand Down

0 comments on commit bef70d2

Please sign in to comment.