X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fformatter_test.exs;h=bfa673049843bcc779d249cd6dc16925eb4ac04f;hb=7ef575d11e46247d1f64dd09d992e532cb8c5c37;hp=47b91b121fe944528f2a71b9fc569c353ea07885;hpb=0c53d91f3bfe7bbd8d8b9ffd332ac2f57b6aba34;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