From 515d5a80eb9ace41e1aa94c6f880738efc56e3b9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 9 Feb 2018 00:24:17 +0300 Subject: www: 404 for non existent blog --- juick-www/src/test/java/com/juick/www/WebAppTests.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'juick-www/src/test/java/com/juick') diff --git a/juick-www/src/test/java/com/juick/www/WebAppTests.java b/juick-www/src/test/java/com/juick/www/WebAppTests.java index dcbcb66c..01dfcdcb 100644 --- a/juick-www/src/test/java/com/juick/www/WebAppTests.java +++ b/juick-www/src/test/java/com/juick/www/WebAppTests.java @@ -325,4 +325,8 @@ public class WebAppTests { .andExpect(model().attribute("visitor", hasProperty("authHash", equalTo(hash)))) .andExpect(content().string(containsString(hash))); } + @Test + public void nonExistentBlogShouldReturn404() throws Exception { + mockMvc.perform(get("/ololoe/")).andExpect(status().isNotFound()); + } } -- cgit v1.2.3