Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuzynow committed Jan 3, 2025
1 parent 85355ba commit 65641b9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -787,17 +787,6 @@ void sendNewMessageNotification_Should_LogError_WhenSessionServiceFails() {
verify(mailService).sendEmailNotification(Mockito.any());
}

@Test
void sendNewFeedbackMessageNotification_Should_LogErrorAndSendNoMails_WhenSessionIsNotFound() {

when(sessionService.getSessionByFeedbackGroupId(RC_FEEDBACK_GROUP_ID)).thenReturn(null);

emailNotificationFacade.sendNewFeedbackMessageNotification(
RC_FEEDBACK_GROUP_ID, CONSULTANT_ID, null);

verify(logger, atLeastOnce()).error(anyString(), anyString());
}

@Test
void
sendNewFeedbackMessageNotification_Should_LogErrorAndSendNoMails_WhenNoConsultantIsAssignedToSession() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,38 +288,6 @@ void assignEnquiry_Should_LogError_WhenAddPeerConsultantToFeedbackGroupFails() {
U25_SESSION_WITHOUT_CONSULTANT, CONSULTANT_WITH_AGENCY, IN_PROGRESS);
}

@Test
void assignEnquiry_Should_LogError_WhenRemoveSystemMessagesFromGroupFails() {
doThrow(new InternalServerErrorException("error"))
.when(rocketChatFacade)
.removeSystemMessagesFromRocketChatGroup(Mockito.any());

assignEnquiryFacade.assignRegisteredEnquiry(
U25_SESSION_WITHOUT_CONSULTANT, CONSULTANT_WITH_AGENCY);

verifyConsultantAndSessionHaveBeenChecked(
U25_SESSION_WITHOUT_CONSULTANT, CONSULTANT_WITH_AGENCY);
verify(sessionService, times(1))
.updateConsultantAndStatusForSession(
U25_SESSION_WITHOUT_CONSULTANT, CONSULTANT_WITH_AGENCY, IN_PROGRESS);
}

@Test
void assignEnquiry_Should_LogError_When_RemoveSystemMessagesFromFeedbackChatFails() {
doThrow(new InternalServerErrorException("error"))
.when(rocketChatFacade)
.removeSystemMessagesFromRocketChatGroup(Mockito.any());

assignEnquiryFacade.assignRegisteredEnquiry(
U25_SESSION_WITHOUT_CONSULTANT, CONSULTANT_WITH_AGENCY);

verifyConsultantAndSessionHaveBeenChecked(
U25_SESSION_WITHOUT_CONSULTANT, CONSULTANT_WITH_AGENCY);
verify(sessionService, times(1))
.updateConsultantAndStatusForSession(
U25_SESSION_WITHOUT_CONSULTANT, CONSULTANT_WITH_AGENCY, IN_PROGRESS);
}

@Test
void assignEnquiry_Should_AddPeerConsultantToFeedbackGroup_WhenSessionHasFeedbackIsTrue() {
assignEnquiryFacade.assignRegisteredEnquiry(
Expand Down

0 comments on commit 65641b9

Please sign in to comment.