aboutsummaryrefslogtreecommitdiff
path: root/juick-server
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-05-08 15:21:50 +0300
committerGravatar Vitaly Takmazov2018-05-08 15:21:50 +0300
commit67c5a5eedcd1bf68ade678935392eace59af1c37 (patch)
tree511c6765a4a03eb6ba98a4abd2886f9fd52b84d1 /juick-server
parent28f91c88d2475c0e8f6b69f2c12200f4c43c98a0 (diff)
5 tags per message limit
Diffstat (limited to 'juick-server')
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java6
1 files changed, 6 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 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 {