X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fformatter_test.exs;h=47b91b121fe944528f2a71b9fc569c353ea07885;hb=baf72d6c580e5c05ef5fea8a57c57150a5d38589;hp=5e70111605f3f738152d662035153bc0d39264c1;hpb=67af50ec713d46e6e1d72605b985858cc15aad3c;p=akkoma diff --git a/test/formatter_test.exs b/test/formatter_test.exs index 5e7011160..47b91b121 100644 --- a/test/formatter_test.exs +++ b/test/formatter_test.exs @@ -206,6 +206,15 @@ defmodule Pleroma.FormatterTest do assert mentions == [] assert expected_text == text end + + test "given the 'safe_mention' option, it will keep text after newlines" do + user = insert(:user) + text = " @#{user.nickname}\n hey dude\n\nhow are you doing?" + + {expected_text, _, _} = Formatter.linkify(text, safe_mention: true) + + assert expected_text =~ "how are you doing?" + end end describe ".parse_tags" do