forked from YokaiRick/akkoma
Formatter: Test link with local mention
This commit is contained in:
parent
5701840d30
commit
880301985b
1 changed files with 10 additions and 0 deletions
|
@ -255,6 +255,16 @@ test "it can parse mentions and return the relevant users" 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
|
||||
|
|
Loading…
Reference in a new issue