From 651a1d64b53db061cc6a24099e706a64cc6d6dd8 Mon Sep 17 00:00:00 2001 From: Maxim Filippov Date: Sat, 19 Jan 2019 04:25:15 +0300 Subject: Add current user to mentioned --- test/user_test.exs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/user_test.exs') diff --git a/test/user_test.exs b/test/user_test.exs index cfccce8d1..935c9c5b1 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -672,12 +672,13 @@ defmodule Pleroma.UserTest do "status" => "hey @#{addressed.nickname} @#{addressed_remote.nickname}" }) - assert [addressed] == User.get_recipients_from_activity(activity) + assert Enum.map([actor, addressed], & &1.ap_id) -- + Enum.map(User.get_recipients_from_activity(activity), & &1.ap_id) == [] {:ok, user} = User.follow(user, actor) {:ok, _user_two} = User.follow(user_two, actor) recipients = User.get_recipients_from_activity(activity) - assert length(recipients) == 2 + assert length(recipients) == 3 assert user in recipients assert addressed in recipients end -- cgit v1.2.3