diff options
author | Vitaly Takmazov | 2018-03-27 22:08:58 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-03-27 22:08:58 +0300 |
commit | cc551432bf80e4466b92c42a77a094f31408abeb (patch) | |
tree | 6e0cc704411b478ad9353228d43145395e926294 /juick-www/src/test/java | |
parent | ed4067c05b68fdb70f8a1edbf520627cd96845d9 (diff) |
move url guessing logic from mapping to Filter
Diffstat (limited to 'juick-www/src/test/java')
-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))); + } } |