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