From 42e2a727c2bc15ac15c9a3af66f126dbefe508a2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 30 Mar 2018 12:47:51 +0300 Subject: server: process attachments correctly --- juick-www/src/test/java/com/juick/WebAppTests.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'juick-www/src') 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()); -- cgit v1.2.3