diff options
Diffstat (limited to 'juick-www/src/test/java/com/juick/www')
-rw-r--r-- | juick-www/src/test/java/com/juick/www/WebAppTests.java | 5 |
1 files changed, 5 insertions, 0 deletions
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))); + } } |