aboutsummaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-06-09 18:06:27 +0000
committerrinpatch <rinpatch@sdf.org>2020-06-09 18:06:27 +0000
commit6c90fc8e70760bf8c58bb731ce294e9eee02f430 (patch)
treebd9a1f004b07c434c1ae2a6b3701ffad52d6304a /test/notification_test.exs
parenta5ccb5b0b1032b102c54d4df2e17c61423089e73 (diff)
parentf05f206e13a152ccdae679e84a29633adfbba2b1 (diff)
downloadpleroma-2.0.6.tar.gz
Merge branch 'release/2.0.6' into 'stable'v2.0.6
Release/2.0.6 See merge request pleroma/pleroma!2632
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r--test/notification_test.exs11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs
index d04754a9d..80fa52312 100644
--- a/test/notification_test.exs
+++ b/test/notification_test.exs
@@ -446,8 +446,7 @@ defmodule Pleroma.NotificationTest do
"status" => "hey again @#{other_user.nickname}!"
})
- [n2, n1] = notifs = Notification.for_user(other_user)
- assert length(notifs) == 2
+ [n2, n1] = Notification.for_user(other_user)
assert n2.id > n1.id
@@ -456,7 +455,9 @@ defmodule Pleroma.NotificationTest do
"status" => "hey yet again @#{other_user.nickname}!"
})
- Notification.set_read_up_to(other_user, n2.id)
+ [_, read_notification] = Notification.set_read_up_to(other_user, n2.id)
+
+ assert read_notification.activity.object
[n3, n2, n1] = Notification.for_user(other_user)
@@ -885,7 +886,9 @@ defmodule Pleroma.NotificationTest do
{:ok, _activity} = CommonAPI.post(muted, %{"status" => "hey @#{user.nickname}"})
- assert length(Notification.for_user(user)) == 1
+ [notification] = Notification.for_user(user)
+
+ assert notification.activity.object
end
test "it doesn't return notifications for muted user with notifications" do