From 67c5a5eedcd1bf68ade678935392eace59af1c37 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 8 May 2018 15:21:50 +0300 Subject: 5 tags per message limit --- juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'juick-server/src/test/java/com/juick') 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 c0501661..70dfd175 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 @@ -791,6 +791,12 @@ public class ServerTests { codeAndTagsTags.get(0).getName()); assertEquals("and the message should be with a C-code and without tags", expectedCodeMessage, codeAndTagsMessage.getText()); + CommandResult result = commandsManager.processCommand(user, "*one *two *three *four *five *six test", emptyUri); + assertThat(result.getNewMessage(), is(Optional.empty())); + assertThat(result.getText(), is("Sorry, 5 tags maximum.")); + result = commandsManager.processCommand(user, String.format("#%d *one *two *three *four *five *six", msg.getMid()), emptyUri); + assertThat(result.getNewMessage(), is(Optional.empty())); + assertThat(result.getText(), is("Tags are NOT updated (5 tags maximum?)")); } @Test public void mailParserTest() throws Exception { -- cgit v1.2.3