freelec-springboot2-webservice
freelec-springboot2-webservice copied to clipboard
p.213 JUnit 5 + Spring Security를 통한 테스트
현재 Spring Security 5.7.3 + JUnit 5를 통해 로그인 기능 테스트 적용 중입니다. 그런데 책과는 약간 다르게, 213p의 문제1. CustomOAuth2UserService을 찾을 수 없음 이 생기지 않더군요. IndexControllerTest의 Posts_수정된다() test와 HelloControllerTest의 hello가_리턴된다() 모두 "USER" 권한을 가지고 있어야 성공할 테스트 같은데, hello가_리턴된다() test는 왜 @WithMockUser(roles = "USER")이 없어도 통과되는지가 궁금합니다.
git: https://github.com/kariskan/springboot2-webservice