From: Alex Gleason Date: Sat, 18 Jul 2020 20:10:48 +0000 (-0500) Subject: Test angry face in formatter D:< #1968 X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=ae74c52e222c6e230ac04f484306c0a16aa270a5;p=akkoma Test angry face in formatter D:< #1968 --- diff --git a/test/formatter_test.exs b/test/formatter_test.exs index ae0d7b377..8713ab9c2 100644 --- a/test/formatter_test.exs +++ b/test/formatter_test.exs @@ -265,6 +265,26 @@ defmodule Pleroma.FormatterTest do assert {^expected, [], []} = Formatter.linkify(text) end + + test "it correctly parses angry face D:< with mention" do + lain = + insert(:user, %{ + nickname: "lain@lain.com", + ap_id: "https://lain.com/users/lain", + id: "9qrWmR0cKniB0YU0TA" + }) + + text = "@lain@lain.com D:<" + + expected_text = + ~S(@lain D:<) + + expected_mentions = [ + {"@lain@lain.com", lain} + ] + + assert {^expected_text, ^expected_mentions, []} = Formatter.linkify(text) + end end describe ".parse_tags" do