diff --git a/backend/src/main/java/mouda/backend/darakbangmember/business/DarakbangMemberService.java b/backend/src/main/java/mouda/backend/darakbangmember/business/DarakbangMemberService.java index 39ac9ae2e..f2cebc31a 100644 --- a/backend/src/main/java/mouda/backend/darakbangmember/business/DarakbangMemberService.java +++ b/backend/src/main/java/mouda/backend/darakbangmember/business/DarakbangMemberService.java @@ -13,20 +13,17 @@ import mouda.backend.darakbangmember.presentation.response.DarakbangMemberResponses; import mouda.backend.darakbangmember.presentation.response.DarakbangMemberRoleResponse; import mouda.backend.member.domain.Member; -import mouda.backend.member.implement.MemberValidator; @Service @Transactional @RequiredArgsConstructor public class DarakbangMemberService { - private final MemberValidator memberValidator; private final DarakbangMemberFinder darakbangMemberFinder; private final DarakbangFinder darakbangFinder; @Transactional(readOnly = true) public DarakbangMemberResponses findAllDarakbangMembers(Long darakbangId, DarakbangMember member) { - memberValidator.validateNotManager(member); DarakbangMembers darakbangMembers = darakbangMemberFinder.findAllDarakbangMembers(darakbangId); return DarakbangMemberResponses.toResponse(darakbangMembers); diff --git a/backend/src/test/java/mouda/backend/darakbangmember/business/DarakbangMemberServiceTest.java b/backend/src/test/java/mouda/backend/darakbangmember/business/DarakbangMemberServiceTest.java index f0985cbb0..2c8fc5abc 100644 --- a/backend/src/test/java/mouda/backend/darakbangmember/business/DarakbangMemberServiceTest.java +++ b/backend/src/test/java/mouda/backend/darakbangmember/business/DarakbangMemberServiceTest.java @@ -13,8 +13,6 @@ import mouda.backend.common.fixture.MemberFixture; import mouda.backend.darakbang.domain.Darakbang; import mouda.backend.darakbang.infrastructure.DarakbangRepository; -import mouda.backend.darakbangmember.domain.DarakbangMember; -import mouda.backend.darakbangmember.exception.DarakbangMemberException; import mouda.backend.darakbangmember.infrastructure.DarakbangMemberRepository; import mouda.backend.darakbangmember.presentation.response.DarakbangMemberRoleResponse; import mouda.backend.member.domain.Member; @@ -35,23 +33,6 @@ class DarakbangMemberServiceTest { @Autowired private DarakbangMemberService darakbangMemberService; - @DisplayName("다락방 멤버 조회 테스트") - @Nested - class DarakbangMemberReadTest { - - @DisplayName("다락방 관리자가 아니라면 멤버 조회에 실패한다.") - @Test - void failToReadWithoutDarakbangManager() { - Member hogee = memberRepository.save(MemberFixture.getHogee()); - Darakbang darakbang = darakbangRepository.save(DarakbangFixture.getDarakbangWithWooteco()); - DarakbangMember darakbangHogee = darakbangMemberRepository.save( - DarakbangMemberFixture.getDarakbangMemberWithWooteco(darakbang, hogee)); - - assertThatThrownBy(() -> darakbangMemberService.findAllDarakbangMembers(darakbang.getId(), darakbangHogee)) - .isInstanceOf(DarakbangMemberException.class); - } - } - @DisplayName("다락방 멤버 권한 조회 테스트") @Nested class DarakbangMemberRoleReadTest {