Skip to content

Commit

Permalink
fix:
Browse files Browse the repository at this point in the history
* improve the test code
  • Loading branch information
Leandro13Silva13 committed Apr 4, 2024
1 parent d88e1ce commit 34077eb
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,7 @@ void initializeSession_Should_initializePeerChat_When_consultingTypeSettingsHasP
agency.setAgencyId(4711L);
var consultant = createConsultantWithAgencies(agency);
var allowedSession = giveAllowedSessionWithID(1L, consultant);
var notAllowedSession = giveNotallowedSessionWithID(2L);
sessions.add(notAllowedSession);
sessions.add(giveAllowedSessionWithID(2L, null));
sessions.add(allowedSession);
when(sessionRepository.findByGroupOrFeedbackGroupIds(singleton("rcGroupId")))
.thenReturn(sessions);
Expand Down Expand Up @@ -914,13 +913,6 @@ private Session giveAllowedSessionWithID(Long id, Consultant consultant) {
return allowedSession;
}

private Session giveNotallowedSessionWithID(Long id) {
Session unhallowedSession =
createAnonymousNewEnquiryWithConsultingType(AGENCY_DTO_SUCHT.getConsultingType());
unhallowedSession.setId(id);
return unhallowedSession;
}

private Session createAnonymousNewEnquiryWithConsultingType(int consultingTypeId) {
var session = easyRandom.nextObject(Session.class);
session.setAgencyId(null);
Expand Down

0 comments on commit 34077eb

Please sign in to comment.