From 3056d8b82253d982bcb6e936e505074108454732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=A4ser?= Date: Tue, 23 Apr 2024 12:08:20 +0200 Subject: [PATCH] Remove test, was moved --- .../controller/ClientConfigControllerIT.java | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 backend/src/test/java/ch/puzzle/okr/controller/ClientConfigControllerIT.java diff --git a/backend/src/test/java/ch/puzzle/okr/controller/ClientConfigControllerIT.java b/backend/src/test/java/ch/puzzle/okr/controller/ClientConfigControllerIT.java deleted file mode 100644 index e809f1ed40..0000000000 --- a/backend/src/test/java/ch/puzzle/okr/controller/ClientConfigControllerIT.java +++ /dev/null @@ -1,34 +0,0 @@ -package ch.puzzle.okr.controller; - -import ch.puzzle.okr.service.clientconfig.ClientConfigService; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.junit.jupiter.MockitoExtension; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.security.test.context.support.WithMockUser; -import org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.result.MockMvcResultMatchers; - -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; - -@WithMockUser(value = "spring") -@ExtendWith(MockitoExtension.class) -@WebMvcTest(ClientConfigController.class) -class ClientConfigControllerIT { - @Autowired - private MockMvc mvc; - @MockBean - private ClientConfigService clientConfigService; - - @Test - void shouldEmptyUsersCache() throws Exception { - mvc.perform(get("/config").with(SecurityMockMvcRequestPostProcessors.csrf())) - .andExpect(MockMvcResultMatchers.status().is2xxSuccessful()); - verify(clientConfigService, times(1)).getConfigBasedOnActiveEnv("pitc.okr.puzzle.ch"); - } -} \ No newline at end of file