projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5701840
)
Formatter: Test link with local mention
author
Alex Gleason
<alex@alexgleason.me>
Tue, 2 Jun 2020 00:51:41 +0000
(19:51 -0500)
committer
Alex Gleason
<alex@alexgleason.me>
Thu, 16 Jul 2020 21:34:43 +0000
(16:34 -0500)
test/formatter_test.exs
patch
|
blob
|
history
diff --git
a/test/formatter_test.exs
b/test/formatter_test.exs
index bef5a2c28813b045cf8ba07cdc9ae84691140d65..ae0d7b37761e57e4d374b8bafe745881a18ee355 100644
(file)
--- 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