aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src')
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
index e23116ad..e8111239 100644
--- a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
@@ -754,6 +754,19 @@ public class ServerTests {
commandsManager.processCommand(user, "D #" + mid, emptyUri).getText());
assertEquals("should be not found", "Message not found",
commandsManager.processCommand(user, "#" + mid, emptyUri).getText());
+
+ String expectedCodeMessage = "some smelly code goes here\n" +
+ "> void main(void** args) {\n" +
+ "> }";
+ String codeAndTags = "*code\n" + expectedCodeMessage;
+ Message codeAndTagsMessage = commandsManager.processCommand(user, codeAndTags, emptyUri).getNewMessage().get();
+ List<Tag> codeAndTagsTags = codeAndTagsMessage.getTags();
+ assertEquals("expected single tag", 1,
+ codeAndTagsTags.size());
+ assertEquals("the single tag should be the 'code'", "code",
+ codeAndTagsTags.get(0).getName());
+ assertEquals("and the message should be with a C-code and without tags", expectedCodeMessage,
+ codeAndTagsMessage.getText());
}
@Test
public void mailParserTest() throws Exception {