Skip to content

Commit

Permalink
fix: CARITAS-243
Browse files Browse the repository at this point in the history
Merge dev into this branch and fix merge issues
  • Loading branch information
Leandro13Silva13 committed Sep 11, 2024
1 parent 644b056 commit daf08f1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ String resolveTypeOfSession(Session session) {
}

void removeConsultantsFromSessionGroups(Session session, List<Consultant> consultants) {
removeConsultantsFromRocketChatGroup(session.getGroupId(), consultants);
removeConsultantsFromRocketChatGroup(
session.getGroupId(), consultants, rocketChatFacade::removeUserFromGroup);
}

void removeConsultantsFromSessionGroup(String rcGroupId, List<Consultant> consultants) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void removeFromGroupOrRollbackOnFailure_Should_executeRemoveForRocketChatGroup()

this.removeService.removeFromGroupOrRollbackOnFailure();

verify(this.rocketChatFacade, times(1)).removeUserFromGroup("rcId", "group");
verify(this.rocketChatFacade, times(1)).removeUserFromGroupIgnoreGroupNotFound("rcId", "group");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ void assignEnquiry_Should_removeAllUnauthorizedMembers_When_sessionIsNotATeamSes
verifyAsync(
(a) ->
verify(this.rocketChatFacade, times(1))
.removeUserFromGroup(consultantToRemove.getRocketChatId(), session.getGroupId()));
.removeUserFromGroupIgnoreGroupNotFound(
consultantToRemove.getRocketChatId(), session.getGroupId()));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,21 +163,11 @@ void assignSession_ShouldNot_removeTeamMembers_When_sessionIsTeamSession() {
verify(this.rocketChatFacade, never())
.removeUserFromGroupIgnoreGroupNotFound(
"teamConsultantRcId", session.getGroupId()));
verifyAsync(
a ->
verify(this.rocketChatFacade, never())
.removeUserFromGroupIgnoreGroupNotFound(
"teamConsultantRcId", session.getFeedbackGroupId()));
verifyAsync(
a ->
verify(this.rocketChatFacade, never())
.removeUserFromGroupIgnoreGroupNotFound(
"teamConsultantRcId2", session.getGroupId()));
verifyAsync(
a ->
verify(this.rocketChatFacade, never())
.removeUserFromGroupIgnoreGroupNotFound(
"teamConsultantRcId2", session.getFeedbackGroupId()));
verifyAsync(
a ->
verify(this.emailNotificationFacade, times(1))
Expand Down

0 comments on commit daf08f1

Please sign in to comment.