@@ -335,23 +335,26 @@ void adoptComment_notPostAuthor_failure() {
335335 .hasMessage ("400 : 채택 권한이 없습니다." );
336336 }
337337
338- @ Test
339- @ DisplayName ("질문 게시글이 아닌 게시글의 댓글 채택 시도 시 실패" )
340- void adoptComment_notQuestionPost_failure () {
341- // given
342- Member postAuthor =
MemberFixture .
create (
1L ,
"[email protected] " ,
"Author" ,
"password" ,
Member .
Role .
MENTEE );
343- Member commenter =
MemberFixture .
create (
2L ,
"[email protected] " ,
"Commenter" ,
"password" ,
Member .
Role .
MENTOR );
344- Post informationPost = createDefaultPost (postAuthor );
345- PostComment comment = createComment (commenter , informationPost , "일반 댓글" );
346- Long commentId = 1L ;
347-
348- when (postCommentRepository .findById (commentId )).thenReturn (Optional .of (comment ));
349-
350- // when & then
351- assertThatThrownBy (() -> postCommentService .adoptComment (commentId , postAuthor ))
352- .isInstanceOf (ServiceException .class )
353- .hasMessage ("400 : 질문 게시글만 채택된 댓글을 가질 수 있습니다." );
354- }
338+ // 운영 정책상
339+ // 변경 질문게시글 에서만 채택 가능 -> 전체 게시글에서 채택 가능
340+ //
341+ // @Test
342+ // @DisplayName("질문 게시글이 아닌 게시글의 댓글 채택 시도 시 실패")
343+ // void adoptComment_notQuestionPost_failure() {
344+ // // given
345+ // Member postAuthor = MemberFixture.create(1L, "[email protected] ", "Author", "password", Member.Role.MENTEE); 346+ // Member commenter = MemberFixture.create(2L, "[email protected] ", "Commenter", "password", Member.Role.MENTOR); 347+ // Post informationPost = createDefaultPost(postAuthor);
348+ // PostComment comment = createComment(commenter, informationPost, "일반 댓글");
349+ // Long commentId = 1L;
350+ //
351+ // when(postCommentRepository.findById(commentId)).thenReturn(Optional.of(comment));
352+ //
353+ // // when & then
354+ // assertThatThrownBy(() -> postCommentService.adoptComment(commentId, postAuthor))
355+ // .isInstanceOf(ServiceException.class)
356+ // .hasMessage("400 : 질문 게시글만 채택된 댓글을 가질 수 있습니다.");
357+ // }
355358
356359 @ Test
357360 @ DisplayName ("이미 채택된 댓글을 다시 채택 시도 시 실패" )
0 commit comments