diff options
author | rinpatch <rinpatch@sdf.org> | 2020-05-27 13:45:14 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-05-27 13:45:14 +0000 |
commit | 91f73a7592049ffe2b1a99e86c6f4ee51218c768 (patch) | |
tree | 426d8723021aa80c8c85183b9a443468de205127 /test | |
parent | b9e2678b9e1223f354d3a00a8c31b50807d8da62 (diff) | |
parent | 73f222d76a03e7bfad1aae80e0dc9d2777a94f3e (diff) | |
download | pleroma-91f73a7592049ffe2b1a99e86c6f4ee51218c768.tar.gz |
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 3a96721fa..37c255fee 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -454,8 +454,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 @@ -464,7 +463,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) @@ -972,7 +973,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 |