Skip to content

Commit

Permalink
[test] : 질문글 등록 단위 테스트 파라미터 수정 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
hyun2371 committed Dec 26, 2024
1 parent f6a85f9 commit 013484a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.dnd.gongmuin.common.fixture.InteractionCountFixture;
import com.dnd.gongmuin.common.fixture.MemberFixture;
import com.dnd.gongmuin.common.fixture.QuestionPostFixture;
import com.dnd.gongmuin.credit_history.domain.CreditType;
import com.dnd.gongmuin.credit_history.service.CreditHistoryService;
import com.dnd.gongmuin.member.domain.Member;
import com.dnd.gongmuin.member.repository.MemberRepository;
Expand Down Expand Up @@ -80,7 +81,11 @@ void registerQuestionPost() {

given(questionPostRepository.save(any(QuestionPost.class))).willReturn(questionPost);
given(memberRepository.save(any(Member.class))).willReturn(member);
doNothing().when(creditHistoryService).saveQuestionPostCreditHistory(anyInt(), any(Member.class));
doNothing().when(creditHistoryService).saveCreditHistory(
CreditType.WRITE_QUESTION_POST,
questionPost.getReward(),
member
);

//when
RegisterQuestionPostResponse response = questionPostService.registerQuestionPost(request, member);
Expand Down

0 comments on commit 013484a

Please sign in to comment.