aboutsummaryrefslogtreecommitdiff
path: root/juick-spring-www/src/test/java/com/juick/www/NotFoundPageTest.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-04-07 10:29:52 +0300
committerGravatar Vitaly Takmazov2017-04-07 10:29:52 +0300
commit9820abe11c0c037f50bb2f7ddbb0bd19646264dc (patch)
tree5a33901fc294546c40b0cdbc65640b041e4c694e /juick-spring-www/src/test/java/com/juick/www/NotFoundPageTest.java
parent6951e2ad47ed4db3dc7d0b08aeadeb09bc3b994d (diff)
juick-www: merge juick-spring-www i18n, drop thymeleaf
Diffstat (limited to 'juick-spring-www/src/test/java/com/juick/www/NotFoundPageTest.java')
-rw-r--r--juick-spring-www/src/test/java/com/juick/www/NotFoundPageTest.java58
1 files changed, 0 insertions, 58 deletions
diff --git a/juick-spring-www/src/test/java/com/juick/www/NotFoundPageTest.java b/juick-spring-www/src/test/java/com/juick/www/NotFoundPageTest.java
deleted file mode 100644
index c01194f4..00000000
--- a/juick-spring-www/src/test/java/com/juick/www/NotFoundPageTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.juick.www;
-
-import com.juick.configuration.DataConfiguration;
-import com.juick.www.configuration.WebSecurityConfig;
-import com.juick.www.configuration.WwwServletConfiguration;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.ContextHierarchy;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.web.WebAppConfiguration;
-import org.springframework.test.web.servlet.MockMvc;
-import org.springframework.test.web.servlet.setup.MockMvcBuilders;
-import org.springframework.web.context.WebApplicationContext;
-
-import javax.inject.Inject;
-
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view;
-
-/**
- * Created by aalexeev on 11/24/16.
- */
-@RunWith(SpringJUnit4ClassRunner.class)
-@WebAppConfiguration
-@ContextHierarchy({
- @ContextConfiguration(classes = {
- com.juick.www.configuration.WebAppConfiguration.class,
- WebSecurityConfig.class,
- DataConfiguration.class}),
- @ContextConfiguration(classes = {WwwServletConfiguration.class}),
-})
-public class NotFoundPageTest {
- @Inject
- private WebApplicationContext wac;
-
- private MockMvc mockMvc;
-
- @Before
- public void setup() {
- this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac)
- .apply(SecurityMockMvcConfigurers.springSecurity()).build();
- }
-
- @Test
- public void pageNotFoundTest() throws Exception {
- mockMvc.perform(get("/-11"))
- .andExpect(status().is4xxClientError())
- .andExpect(view().name("views/error"));
-
- mockMvc.perform(get("/-1"))
- .andExpect(status().is4xxClientError())
- .andExpect(view().name("views/error"));
- }
-}