diff options
| author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-14 19:45:22 +0400 |
|---|---|---|
| committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-14 19:45:22 +0400 |
| commit | 247e6fcb9039470875fa9cb6c3406b57235dd419 (patch) | |
| tree | 50152e4b9b8aa53cf9dcbe237934c411fc1b242f /test/notification_test.exs | |
| parent | 7e0b42d99f3eb9520bc29cc29c06512c55183482 (diff) | |
| parent | bf3afbc1a109e5965b335b21d4e7c522ad7a571c (diff) | |
| download | pleroma-247e6fcb9039470875fa9cb6c3406b57235dd419.tar.gz pleroma-247e6fcb9039470875fa9cb6c3406b57235dd419.zip | |
Merge branch 'develop' into openapi/account
Diffstat (limited to 'test/notification_test.exs')
| -rw-r--r-- | test/notification_test.exs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs index 837a9dacd..f78a47af6 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -45,6 +45,9 @@ defmodule Pleroma.NotificationTest do assert notified_ids == [other_user.id, third_user.id] assert notification.activity_id == activity.id assert other_notification.activity_id == activity.id + + assert [%Pleroma.Marker{unread_count: 2}] = + Pleroma.Marker.get_markers(other_user, ["notifications"]) end test "it creates a notification for subscribed users" do @@ -410,6 +413,16 @@ defmodule Pleroma.NotificationTest do assert n1.seen == true assert n2.seen == true assert n3.seen == false + + assert %Pleroma.Marker{} = + m = + Pleroma.Repo.get_by( + Pleroma.Marker, + user_id: other_user.id, + timeline: "notifications" + ) + + assert m.last_read_id == to_string(n2.id) end end |
