diff options
author | Vitaly Takmazov | 2018-05-17 22:26:14 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-05-17 22:26:14 +0300 |
commit | c3f5d83b7beed8a523b8a851df742ef028de5efd (patch) | |
tree | 4ec9f404c8bd4383e37f3b7bfe342fd01ca0ceb1 /juick-server/src/test/java/com | |
parent | ed2e863fe4acfdb5015b5514c3219bef8c215ff3 (diff) |
fix unsafe urls stripping
Diffstat (limited to 'juick-server/src/test/java/com')
-rw-r--r-- | juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 7 |
1 files changed, 3 insertions, 4 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 be81212b..177ced5e 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,11 +797,10 @@ 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); + 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")); + assertFalse(result.getNewMessage().get().getText().contains("VTYZkKV8FWkmu6g1")); result = commandsManager.processCommand(user, "*корм *juick_ppl *рационализм *? *мюсли а сколько микроморт в дневной порции сверхмюслей?", emptyUri); assertTrue(result.getNewMessage().isPresent()); } |