diff options
author | Vitaly Takmazov | 2018-09-25 10:28:54 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-09-25 10:28:54 +0300 |
commit | 85abc3e201539f81500754a7fb0e4f3a9d148fc4 (patch) | |
tree | 7d2e037fd6d0caea78162b9820b01d89aec1010d /juick-server/src/test/java | |
parent | 933e5702864d0babcd9f8cbc1791078f387b24c7 (diff) |
fix new message tags extracting
Diffstat (limited to 'juick-server/src/test/java')
-rw-r--r-- | juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 8 |
1 files changed, 6 insertions, 2 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 c4915acf..924864f6 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 @@ -1692,8 +1692,12 @@ public class ServerTests { } @Test public void newMessageShouldNotContainDuplicatedTags() throws Exception { - CommandResult result = commandsManager.processCommand(ugnich, "*test *test test", emptyUri); + CommandResult result = commandsManager.processCommand(ugnich, "*test1 *test2 *test1 test3", emptyUri); assertThat(result.getNewMessage().isPresent(), is(true)); - assertThat(result.getNewMessage().get().getTags().size(), is (1)); + Message msg = result.getNewMessage().get(); + assertThat(msg.getTags().size(), is (2)); + assertThat(msg.getTags().get(0).getName(), is("test1")); + assertThat(msg.getTags().get(1).getName(), is("test2")); + assertThat(msg.getText(), is("test3")); } } |