Merge branch 'feature/jobs' into 'develop'
[akkoma] / test / formatter_test.exs
index bd8844458c66353ca5338ea66c756f29f9a0a58a..f14077d25559d4f295e8a83bd1089479ea844679 100644 (file)
@@ -124,7 +124,7 @@ defmodule Pleroma.FormatterTest do
   end
 
   describe "add_user_links" do
-    test "gives a replacement for user links" do
+    test "gives a replacement for user links, using local nicknames in user links text" do
       text = "@gsimg According to @archa_eme_, that is @daggsy. Also hello @archaeme@archae.me"
       gsimg = insert(:user, %{nickname: "gsimg"})
 
@@ -197,7 +197,7 @@ defmodule Pleroma.FormatterTest do
 
       {subs, text} = Formatter.add_user_links({[], text}, mentions)
 
-      assert length(subs) == 0
+      assert Enum.empty?(subs)
       Enum.each(subs, fn {uuid, _} -> assert String.contains?(text, uuid) end)
 
       expected_text = "@a hi"