diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-06-01 19:51:41 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-07-16 16:34:43 -0500 |
commit | 880301985b49dd0e38a748a9c834eec4d550ea1b (patch) | |
tree | 28cb33daef73c6162cf056a83a15e13ff630e678 | |
parent | 5701840d30f8f70721598115039519e3fe747186 (diff) | |
download | pleroma-880301985b49dd0e38a748a9c834eec4d550ea1b.tar.gz |
Formatter: Test link with local mention
-rw-r--r-- | test/formatter_test.exs | 10 |
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 |