aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/formatter_test.exs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/formatter_test.exs b/test/formatter_test.exs
index bef5a2c28..ae0d7b377 100644
--- a/test/formatter_test.exs
+++ b/test/formatter_test.exs
@@ -255,6 +255,16 @@ defmodule Pleroma.FormatterTest do
assert {_text, ^expected_mentions, []} = Formatter.linkify(text)
end
+
+ test "it parses URL containing local mention" do
+ _user = insert(:user, %{nickname: "lain"})
+
+ text = "https://example.com/@lain"
+
+ expected = ~S(<a href="https://example.com/@lain" rel="ugc">https://example.com/@lain</a>)
+
+ assert {^expected, [], []} = Formatter.linkify(text)
+ end
end
describe ".parse_tags" do