Skip to content

Commit

Permalink
Don't check recipients for the testSendSelfReviewCompletionEmailToRev…
Browse files Browse the repository at this point in the history
…iewers test because they are non-deterministic.
  • Loading branch information
ocielliottc committed Oct 10, 2024
1 parent 8577602 commit 01a7e6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public static void validateEmail(String action, String fromName,
if (partialBody != null && !partialBody.isEmpty()) {
assertTrue(event.get(4).contains(partialBody));
}
assertEquals(recipients, event.get(5));
if (recipients != null && !recipients.isEmpty()) {
assertEquals(recipients, event.get(5));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,10 @@ void testSendSelfReviewCompletionEmailToReviewers() {
feedbackRequestServices.sendSelfReviewCompletionEmailToReviewers(feedbackRequest, reviewAssignmentsSet);

// This should equal the number of review assignments.
// The order in which emails are sent is random. We will not be
// checking the recipient.
assertEquals(2, emailSender.events.size());
EmailHelper.validateEmail("SEND_EMAIL", "null", "null", "firstName lastName has finished their self-review for Self-Review Test.", "firstName lastName has completed their self-review", reviewer02.getWorkEmail(), emailSender.events.getFirst());
EmailHelper.validateEmail("SEND_EMAIL", "null", "null", "firstName lastName has finished their self-review for Self-Review Test.", "firstName lastName has completed their self-review", null, emailSender.events.getFirst());
}

@Test
Expand Down

0 comments on commit 01a7e6b

Please sign in to comment.