X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fformatter_test.exs;h=bfa673049843bcc779d249cd6dc16925eb4ac04f;hb=8900cb68aef535dbf60de87fce47d85b91909077;hp=47b91b121fe944528f2a71b9fc569c353ea07885;hpb=334ffcb86fbd88da33f0a6ab392e599f969a4112;p=akkoma
diff --git a/test/formatter_test.exs b/test/formatter_test.exs
index 47b91b121..bfa673049 100644
--- a/test/formatter_test.exs
+++ b/test/formatter_test.exs
@@ -184,17 +184,19 @@ defmodule Pleroma.FormatterTest do
test "given the 'safe_mention' option, it will only mention people in the beginning" do
user = insert(:user)
- _other_user = insert(:user)
+ other_user = insert(:user)
third_user = insert(:user)
- text = " @#{user.nickname} hey dude i hate @#{third_user.nickname}"
+ text = " @#{user.nickname} @#{other_user.nickname} hey dudes i hate @#{third_user.nickname}"
{expected_text, mentions, [] = _tags} = Formatter.linkify(text, safe_mention: true)
- assert mentions == [{"@#{user.nickname}", user}]
+ assert mentions == [{"@#{user.nickname}", user}, {"@#{other_user.nickname}", other_user}]
assert expected_text ==
"@#{user.nickname} hey dude i hate @#{user.nickname} @#{other_user.nickname} hey dudes i hate @#{third_user.nickname}"
end