From cc551432bf80e4466b92c42a77a094f31408abeb Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 27 Mar 2018 22:08:58 +0300 Subject: move url guessing logic from mapping to Filter --- juick-www/src/test/java/com/juick/www/WebAppTests.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'juick-www/src/test') 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 e1fbace6..c34fcea8 100644 --- a/juick-www/src/test/java/com/juick/www/WebAppTests.java +++ b/juick-www/src/test/java/com/juick/www/WebAppTests.java @@ -375,4 +375,9 @@ public class WebAppTests { .andExpect(status().is3xxRedirection()) .andExpect(redirectedUrl("/login/success")); } + @Test + public void anythingRedirects() throws Exception { + int mid = messagesService.createMessage(ugnich.getUid(), "yo", null, null); + mockMvc.perform(get(String.format("/%d", mid))).andExpect(redirectedUrl(String.format("/%s/%d", ugnich.getName(), mid))); + } } -- cgit v1.2.3