summaryrefslogtreecommitdiff
path: root/test/formatter_test.exs
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2019-05-24 21:05:57 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2019-05-24 21:05:57 +0700
commitf333041a0a2b9c2f1ef2236254b8dd3e9a55a688 (patch)
tree317be4a8b7c0b9a231853ee05547554f5da74c3f /test/formatter_test.exs
parent3b71612d3d8b5e2ad53bda4399eb7f687cd6c30e (diff)
parent6499adc6a83b4064f7283de3c729053e62ade7b2 (diff)
downloadpleroma-f333041a0a2b9c2f1ef2236254b8dd3e9a55a688.tar.gz
pleroma-f333041a0a2b9c2f1ef2236254b8dd3e9a55a688.zip
Merge remote-tracking branch 'pleroma/develop' into feature/addressable-lists
Diffstat (limited to 'test/formatter_test.exs')
-rw-r--r--test/formatter_test.exs9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/formatter_test.exs b/test/formatter_test.exs
index 5e7011160..47b91b121 100644
--- a/test/formatter_test.exs
+++ b/test/formatter_test.exs
@@ -206,6 +206,15 @@ defmodule Pleroma.FormatterTest do
assert mentions == []
assert expected_text == text
end
+
+ test "given the 'safe_mention' option, it will keep text after newlines" do
+ user = insert(:user)
+ text = " @#{user.nickname}\n hey dude\n\nhow are you doing?"
+
+ {expected_text, _, _} = Formatter.linkify(text, safe_mention: true)
+
+ assert expected_text =~ "how are you doing?"
+ end
end
describe ".parse_tags" do