From f9f4115b7baeb9a73b63ecda3397994961071373 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 8 May 2018 21:46:36 +0300 Subject: common: strip login urls from input --- juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'juick-server/src/test/java/com') 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 70dfd175..3c12de40 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 @@ -797,6 +797,11 @@ public class ServerTests { 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?)")); + result = commandsManager.processCommand(user, "I'm very smart to post my login url there: " + + "https://juick.com/settings?hash=VTYZkKV8FWkmu6g1", emptyUri); + assertThat(result.getNewMessage().isPresent(), is(true)); + assertThat(result.getNewMessage().get().getText(), is("I'm very smart to post my login url there: " + + "https://juick.com/settings?hash=")); } @Test public void mailParserTest() throws Exception { -- cgit v1.2.3