diff options
Diffstat (limited to 'juick-api/src/test/java/com')
-rw-r--r-- | juick-api/src/test/java/com/juick/api/tests/MessagesTests.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/juick-api/src/test/java/com/juick/api/tests/MessagesTests.java b/juick-api/src/test/java/com/juick/api/tests/MessagesTests.java index 6996adb9..0b16ae7f 100644 --- a/juick-api/src/test/java/com/juick/api/tests/MessagesTests.java +++ b/juick-api/src/test/java/com/juick/api/tests/MessagesTests.java @@ -6,6 +6,7 @@ import com.juick.User; import com.juick.api.configuration.ApiAppConfiguration; import com.juick.api.configuration.ApiMvcConfiguration; import com.juick.api.configuration.ApiSecurityConfig; +import com.juick.api.configuration.JuickHashFilter; import com.juick.configuration.DataConfiguration; import com.juick.service.MessagesService; import com.juick.service.UserService; @@ -118,7 +119,9 @@ public class MessagesTests { .andExpect(jsonPath("$[0].body", is(msgText))); String hash = RandomStringUtils.random(16); when(userService.getHashByUID(1)).thenReturn(hash); - mockMvc.perform(get("/messages") + when(userService.getUserByHash(hash)).thenReturn(user); + when(userService.getUIDbyHash(hash)).thenReturn(1); + mockMvc.perform(get("/home") .param("hash", hash)) .andExpect(status().isOk()); } |