diff options
author | Vitaly Takmazov | 2018-03-30 12:47:51 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-03-30 12:47:51 +0300 |
commit | 42e2a727c2bc15ac15c9a3af66f126dbefe508a2 (patch) | |
tree | fd704fda59b8814919bbd32ca2f43d13ef22a05f /juick-www/src/test/java | |
parent | 42af9310f0c195a68212cd9d06f2a3f06a402891 (diff) |
server: process attachments correctly
Diffstat (limited to 'juick-www/src/test/java')
-rw-r--r-- | juick-www/src/test/java/com/juick/WebAppTests.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/juick-www/src/test/java/com/juick/WebAppTests.java b/juick-www/src/test/java/com/juick/WebAppTests.java index 48b8c5ef..e9908acd 100644 --- a/juick-www/src/test/java/com/juick/WebAppTests.java +++ b/juick-www/src/test/java/com/juick/WebAppTests.java @@ -246,9 +246,12 @@ public class WebAppTests { mockMvc.perform(post("/post") .cookie(loginResult.getResponse().getCookies()) .param("wrong_param", "yo")).andExpect(status().isBadRequest()); + String msgText = "yoppppl"; mockMvc.perform(post("/post") .cookie(loginResult.getResponse().getCookies()) - .param("body", "yo")).andExpect(status().isOk()); + .param("body", msgText)).andExpect(status().isOk()); + Message lastMessage = messagesService.getMessage(messagesService.getMyFeed(ugnich.getUid(), 0, false).get(0)); + assertThat(lastMessage.getText(), equalTo(msgText)); mockMvc.perform(post("/post") .cookie(loginResult.getResponse().getCookies()) .param("img", "http://static.juick.com/settings/facebook.png")).andExpect(status().isOk()); |