aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick/MessageTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/juick/MessageTest.java')
-rw-r--r--src/test/java/com/juick/MessageTest.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/java/com/juick/MessageTest.java b/src/test/java/com/juick/MessageTest.java
index 6ce01f4a..e750f652 100644
--- a/src/test/java/com/juick/MessageTest.java
+++ b/src/test/java/com/juick/MessageTest.java
@@ -243,7 +243,11 @@ public class MessageTest {
var safeMessage = "And that is a [odd](https://juick.com/a/1)? aaapaa";
var nonsafeMessage = "[Here is my link](https://juick.com?hash=12345)";
var filteredMessage = "[Here is my link](https://juick.com)";
+ var pidginMessage = "I'm very smart to post my login url there<https://juick.com/settings?hash=VTYZkKV8FWkmu6g1>";
+ var westernMessage = "«Please, verify your account at https://juick.com/settings?hash=12345»";
assertThat(MessageUtils.stripNonSafeUrls(safeMessage), is(safeMessage));
assertThat(MessageUtils.stripNonSafeUrls(nonsafeMessage), is(filteredMessage));
+ assertThat(MessageUtils.stripNonSafeUrls(pidginMessage), not(containsString("VTYZkKV8FWkmu6g1")));
+ assertThat(MessageUtils.stripNonSafeUrls(westernMessage), containsString("»"));
}
}