aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/test/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-27 22:08:58 +0300
committerGravatar Vitaly Takmazov2018-03-27 22:08:58 +0300
commitcc551432bf80e4466b92c42a77a094f31408abeb (patch)
tree6e0cc704411b478ad9353228d43145395e926294 /juick-www/src/test/java
parented4067c05b68fdb70f8a1edbf520627cd96845d9 (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.java5
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)));
+ }
}