diff options
Diffstat (limited to 'src/test/java/com/juick')
-rw-r--r-- | src/test/java/com/juick/MessageTest.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/java/com/juick/MessageTest.java b/src/test/java/com/juick/MessageTest.java index 2d12a3df9..0b48efa1b 100644 --- a/src/test/java/com/juick/MessageTest.java +++ b/src/test/java/com/juick/MessageTest.java @@ -206,4 +206,13 @@ public class MessageTest { Remark remark = new Remark(options); String parsed = remark.convertFragment(text); } + @Test + public void messageFormatTest() { + String msg = "> quote\nmessage"; + assertThat(MessageUtils.formatMessage(msg), is("<q>quote</q>message")); + String brokenComment = "<!-- read next"; + assertThat(MessageUtils.formatMessage(brokenComment), is("<!-- read next")); + String url = "[ya](http://ya.ru)"; + assertThat(MessageUtils.formatMessage(url), is("<a href=\"http://ya.ru\" rel=\"nofollow\">ya</a>")); + } } |