aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-01-12 15:20:33 +0300
committerGravatar Vitaly Takmazov2017-01-12 15:20:33 +0300
commit14dee26c8785fd23075b6dc884d42d5d3f0176f6 (patch)
tree0f7d112c1e5fc0c652d8d2a7875a7d7e87f8e2ca /src
parent0c1ef3ab4f352445df3c1ebf87fe9eac2f78df41 (diff)
juick-server: fix sql message mapper
Diffstat (limited to 'src')
-rw-r--r--src/test/java/com/juick/tests/ApiTests.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/java/com/juick/tests/ApiTests.java b/src/test/java/com/juick/tests/ApiTests.java
index c1a1bb35..0317dbb4 100644
--- a/src/test/java/com/juick/tests/ApiTests.java
+++ b/src/test/java/com/juick/tests/ApiTests.java
@@ -18,6 +18,7 @@ import com.juick.service.search.SearchService;
import com.juick.www.controllers.PageTemplates;
import org.apache.commons.dbcp2.BasicDataSource;
import org.apache.commons.lang3.StringEscapeUtils;
+import org.apache.commons.lang3.StringUtils;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -185,6 +186,10 @@ public class ApiTests {
assertEquals("object tags should unescaped", htmlTag.getName(), StringEscapeUtils.unescapeHtml4(dbTagName));
assertEquals("template should encode escaped tag in url and show escaped tag in name",
"<a href=\"/tag/%3E_%3C\" rel=\"nofollow\">&gt;_&lt;</a>", templates.formatTags(Collections.singletonList(htmlTagStats)));
+ int mid4 = messagesService.createMessage(user_id, "yoyoyo", null, null);
+ Message msg4 = messagesService.getMessage(mid4);
+ assertEquals("tags string should be empty", StringUtils.EMPTY, msg4.getTagsString());
+ messagesService.deleteMessage(user_id, mid4);
}
@Test