Skip to content

Commit

Permalink
fix: 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
birdieHyun committed Nov 4, 2023
1 parent 7024ed2 commit 336e7f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void findAllBoardTest() throws Exception {
List<SingleBoardResponse> mockResults = List.of(SingleBoardResponse.fromBoard(board));
Page<SingleBoardResponse> mockPage = new PageImpl<>(mockResults);

given(boardService.findAllBoard(any())).willReturn(mockPage);
given(boardService.findAllBoard(any(), any())).willReturn(mockPage);


// when & then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void findAllBoardTest() {
Board savedBoard = boardRepository.save(board);

// when
Page<SingleBoardResponse> boards = boardService.findAllBoard(PageRequest.of(0, 10));
Page<SingleBoardResponse> boards = boardService.findAllBoard(PageRequest.of(0, 10), null);
List<SingleBoardResponse> content = boards.getContent();

// then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void kakaoOauthLoginTest() throws Exception {
MockHttpSession session = new MockHttpSession();

KakaoCode kakaoCode = KakaoCode.builder()
.value("kakaoCode")
.kakaoCode("kakaoCode")
.build();

OauthToken oauthToken = OauthToken.builder()
Expand All @@ -68,7 +68,7 @@ void kakaoOauthLoginTest() throws Exception {
.id(1L)
.build();

given(oauthLoginService.getOauthToken(kakaoCode.getValue(), kakaoOauthInfo)).willReturn(oauthToken);
given(oauthLoginService.getOauthToken(kakaoCode.getKakaoCode(), kakaoOauthInfo)).willReturn(oauthToken);
given(oauthLoginService.processKakaoLogin(oauthToken.getAccessToken(), kakaoOauthInfo.getLoginUri())).willReturn(kakaoLoginResponse);

// when
Expand All @@ -78,7 +78,7 @@ void kakaoOauthLoginTest() throws Exception {
mockMvc.perform(
post("/oauth/kakao")
.contentType(MediaType.APPLICATION_JSON)
.content(objectMapper.writeValueAsString(kakaoCode.getValue()))
.content(objectMapper.writeValueAsString(kakaoCode.getKakaoCode()))
.session(session)
).andDo(print())
.andExpect(status().isOk())
Expand Down

0 comments on commit 336e7f9

Please sign in to comment.