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"})
{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"