Skip to content

Commit

Permalink
chore: testcode 에러 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hjj4060 committed Jun 11, 2024
1 parent cd5f00f commit 0ff25b9
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.web.servlet.MockMvc;

import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.anonymous;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

Expand All @@ -21,17 +20,6 @@ class SecurityConfigurationUnitTest {
@Autowired
MockMvc mockMvc;

@DisplayName("인덱스 페이지는 권한 없이 사용이 가능한지 테스트")
@Test
void indexPageAuthorityTest() throws Exception {
//given
final String url = "/";

//when && then
mockMvc.perform(get(url).with(anonymous()))
.andExpect(status().isOk());
}

@DisplayName("인증된 사용자는 User 페이지 사용이 가능한지 테스트")
@Test
@WithMockUser(username = "현수", roles = "USER")
Expand Down

0 comments on commit 0ff25b9

Please sign in to comment.