Skip to content

Commit

Permalink
Fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
xenosf committed Mar 27, 2024
1 parent 8ca4364 commit e489f48
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,11 @@ void testExecute_leadingAndTrailingSpacesAndNullComments_createsSuccessfully() {
assertNull(accountRequest.getComments());
assertNull(accountRequest.getRegisteredAt());
verifySpecifiedTasksAdded(Const.TaskQueue.SEARCH_INDEXING_QUEUE_NAME, 1);
verifyNumberOfEmailsSent(1);
verifyNumberOfEmailsSent(2);
EmailWrapper sentAdminAlertEmail = mockEmailSender.getEmailsSent().get(0);
EmailWrapper sentAcknowledgementEmail = mockEmailSender.getEmailsSent().get(1);
assertEquals(EmailType.NEW_ACCOUNT_REQUEST_ADMIN_ALERT, sentAdminAlertEmail.getType());
assertEquals(EmailType.NEW_ACCOUNT_REQUEST_ACKNOWLEDGEMENT, sentAcknowledgementEmail.getType());
}

@Test
Expand Down Expand Up @@ -188,9 +190,11 @@ void testExecute_accountRequestWithSameEmailAddressAndInstituteAlreadyExists_cre
assertEquals("My road leads into the desert. I can see it.", accountRequest.getComments());
assertNull(accountRequest.getRegisteredAt());
verifySpecifiedTasksAdded(Const.TaskQueue.SEARCH_INDEXING_QUEUE_NAME, 1);
verifyNumberOfEmailsSent(1);
verifyNumberOfEmailsSent(2);
EmailWrapper sentAdminAlertEmail = mockEmailSender.getEmailsSent().get(0);
EmailWrapper sentAcknowledgementEmail = mockEmailSender.getEmailsSent().get(1);
assertEquals(EmailType.NEW_ACCOUNT_REQUEST_ADMIN_ALERT, sentAdminAlertEmail.getType());
assertEquals(EmailType.NEW_ACCOUNT_REQUEST_ACKNOWLEDGEMENT, sentAcknowledgementEmail.getType());
}

@Override
Expand Down

0 comments on commit e489f48

Please sign in to comment.