diff options
author | rinpatch <rinpatch@sdf.org> | 2020-05-27 13:45:14 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-06-08 00:58:31 +0300 |
commit | 3687788cf2ab91f6f40f76f9a82c448c477b1fec (patch) | |
tree | 6aa8e806db14befcce403b6b0681603cbe6da3ef /test | |
parent | f10b40828fd5f1e4fc7c4ffa9deb543d6a18eb17 (diff) | |
download | pleroma-3687788cf2ab91f6f40f76f9a82c448c477b1fec.tar.gz pleroma-3687788cf2ab91f6f40f76f9a82c448c477b1fec.zip |
Merge branch 'notification-fixes' into 'develop'
Notification performance fixes
See merge request pleroma/pleroma!2595
Diffstat (limited to 'test')
-rw-r--r-- | test/notification_test.exs | 11 |
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 |