diff options
author | lain <lain@soykaf.club> | 2020-05-29 12:36:17 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-29 12:36:17 +0200 |
commit | af6d01ec93a07cd896bc4f0a2c2cf437c6fd51fc (patch) | |
tree | 54e02858d0fa9ca905ffe5a057c9f0accbeae115 /test/notification_test.exs | |
parent | dbd07d29a358a446d87078d60b993a59b757ad1d (diff) | |
parent | 396bc69aeef951f163c0c20474ce4653df1dd667 (diff) | |
download | pleroma-af6d01ec93a07cd896bc4f0a2c2cf437c6fd51fc.tar.gz |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
Diffstat (limited to 'test/notification_test.exs')
-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 |