From 880301985b49dd0e38a748a9c834eec4d550ea1b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 1 Jun 2020 19:51:41 -0500 Subject: [PATCH] Formatter: Test link with local mention --- test/formatter_test.exs | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 @@ 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(https://example.com/@lain) + + assert {^expected, [], []} = Formatter.linkify(text) + end end describe ".parse_tags" do