From 959effbbad1f8bbf3f90879212732a2e42011b22 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 21 May 2018 16:30:41 +0300 Subject: permanent redirect for /DDDDDD links --- juick-www/src/test/java/com/juick/WebAppTests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'juick-www/src/test/java/com/juick') diff --git a/juick-www/src/test/java/com/juick/WebAppTests.java b/juick-www/src/test/java/com/juick/WebAppTests.java index 1041596a..e74b694e 100644 --- a/juick-www/src/test/java/com/juick/WebAppTests.java +++ b/juick-www/src/test/java/com/juick/WebAppTests.java @@ -384,7 +384,9 @@ public class WebAppTests { @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))); + mockMvc.perform(get(String.format("/%d", mid))) + .andExpect(status().isMovedPermanently()) + .andExpect(redirectedUrl(String.format("/%s/%d", ugnich.getName(), mid))); } @Test public void appAssociationsTest() throws Exception { -- cgit v1.2.3