File tree Expand file tree Collapse file tree
main/java/com/haruhan/bookmark/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public class BookmarkServiceImpl implements BookmarkService {
3030
3131 // 사용 가능한 데이터인지 확인하는 메소드
3232 private Bookmark isUsableData (BookmarkReqDto bookmarkReqDto ) {
33- // 이메일로 사용자 찾기
33+ // 토큰 값으로 사용자 찾기
3434 User user = userRepository .findByToken (bookmarkReqDto .token ())
3535 .orElseThrow (() -> new CustomException (StatusCode .NOT_FOUND_USER ));
3636
Original file line number Diff line number Diff line change 11package com .haruhan .bookmark .controller ;
22
33import com .fasterxml .jackson .databind .ObjectMapper ;
4- import com .haruhan .bookmark .dto .BookmarkReqDto ;
54import com .haruhan .bookmark .service .BookmarkService ;
6- import org .junit .jupiter .api .DisplayName ;
7- import org .junit .jupiter .api .Test ;
85import org .springframework .beans .factory .annotation .Autowired ;
96import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
107import org .springframework .boot .test .autoconfigure .web .servlet .WebMvcTest ;
118import org .springframework .boot .test .mock .mockito .MockBean ;
12- import org .springframework .http .MediaType ;
139import org .springframework .test .web .servlet .MockMvc ;
1410
15- import static org .mockito .ArgumentMatchers .any ;
16- import static org .mockito .Mockito .*;
17- import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .post ;
18- import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .status ;
19-
2011@ WebMvcTest (BookmarkController .class )
2112@ AutoConfigureMockMvc
2213public class BookmarkControllerTest {
Original file line number Diff line number Diff line change @@ -107,4 +107,4 @@ void setUp() {
107107// //Then
108108// assertEquals(StatusCode.NOT_FOUND, exception.getStatusCode());
109109// }
110- }
110+ }
Original file line number Diff line number Diff line change 44import com .haruhan .common .error .CustomException ;
55import com .haruhan .common .error .StatusCode ;
66import com .haruhan .user .dto .UserRequestDto ;
7- import com .haruhan .user .dto .UserSettingRequestDto ;
87import com .haruhan .user .entity .PreferedTime ;
98import com .haruhan .user .service .UserService ;
109import org .junit .jupiter .api .DisplayName ;
1817
1918import static org .mockito .ArgumentMatchers .any ;
2019import static org .mockito .Mockito .*;
21- import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .patch ;
2220import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .post ;
2321import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .status ;
2422
You can’t perform that action at this time.
0 commit comments