Skip to content

Commit 7013ef9

Browse files
committed
test(community): 삭제 메서드 변경
1 parent 62692be commit 7013ef9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/test/java/com/somemore/community/service/query/CommunityBoardQueryServiceTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.somemore.community.dto.response.CommunityBoardGetResponseDto;
1111
import com.somemore.community.repository.CommunityBoardRepository;
1212
import com.somemore.community.usecase.command.CreateCommunityBoardUseCase;
13+
import com.somemore.community.usecase.command.DeleteCommunityBoardUseCase;
1314
import com.somemore.global.exception.BadRequestException;
1415
import com.somemore.global.exception.ExceptionMessage;
1516
import com.somemore.volunteer.domain.Volunteer;
@@ -37,6 +38,8 @@ class CommunityBoardQueryServiceTest extends IntegrationTestSupport {
3738
@Autowired
3839
CreateCommunityBoardUseCase createCommunityBoardUseCase;
3940
@Autowired
41+
DeleteCommunityBoardUseCase deleteCommunityBoardUseCase;
42+
@Autowired
4043
CommunityBoardQueryService communityBoardQueryService;
4144

4245
@AfterEach
@@ -209,7 +212,7 @@ void getCommunityBoardDetailWithDeletedId() {
209212

210213
Long communityId = createCommunityBoardUseCase.createCommunityBoard(dto1, savedVolunteer.getId(), imgUrl);
211214

212-
communityBoardRepository.deleteAllInBatch();
215+
deleteCommunityBoardUseCase.deleteCommunityBoard(savedVolunteer.getId(), communityId);
213216

214217
//when
215218
ThrowableAssert.ThrowingCallable callable = () -> communityBoardQueryService.getCommunityBoardDetail(communityId);

0 commit comments

Comments
 (0)