From ca42a4a8288655fa529c61b49ee29e439513993e Mon Sep 17 00:00:00 2001 From: 0-wook Date: Mon, 19 Feb 2024 10:55:26 +0900 Subject: [PATCH] update --- .../kr/co/automl/HelloControllerTest.java | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 app/admin-server/src/test/java/kr/co/automl/HelloControllerTest.java diff --git a/app/admin-server/src/test/java/kr/co/automl/HelloControllerTest.java b/app/admin-server/src/test/java/kr/co/automl/HelloControllerTest.java deleted file mode 100644 index 611f129..0000000 --- a/app/admin-server/src/test/java/kr/co/automl/HelloControllerTest.java +++ /dev/null @@ -1,37 +0,0 @@ -package kr.co.automl; - -import kr.co.automl.global.config.security.SecurityConfig; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.FilterType; -import org.springframework.security.test.context.support.WithMockUser; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.ResultActions; - -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -@WebMvcTest(controllers = HelloController.class, excludeFilters = { - @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = SecurityConfig.class) -}) -@AutoConfigureMockMvc -class HelloControllerTest { - - @Autowired - private MockMvc mockMvc; - - @Test - @WithMockUser - void hello() throws Exception { - ResultActions action = mockMvc.perform( - get("/hello")); - - action - .andExpect(status().isOk()) - .andExpect(content().string("Hello, World!")); - } -}