summaryrefslogtreecommitdiff
path: root/test/user_test.exs
diff options
context:
space:
mode:
authorMaxim Filippov <colixer@gmail.com>2019-01-19 04:25:15 +0300
committerMaxim Filippov <colixer@gmail.com>2019-01-19 04:25:15 +0300
commit651a1d64b53db061cc6a24099e706a64cc6d6dd8 (patch)
tree0b1ae6588de41f59d5a88948e121745f92645a74 /test/user_test.exs
parente116e55cabb34d468866231d1690421792c27a0c (diff)
downloadpleroma-651a1d64b53db061cc6a24099e706a64cc6d6dd8.tar.gz
pleroma-651a1d64b53db061cc6a24099e706a64cc6d6dd8.zip
Add current user to mentioned
Diffstat (limited to 'test/user_test.exs')
-rw-r--r--test/user_test.exs5
1 files changed, 3 insertions, 2 deletions
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