diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-04-14 11:58:38 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-04-14 11:58:38 +0300 |
commit | 650853fc895fb2e21eac347e056eab98b842a3b7 (patch) | |
tree | 7df844177fb8aa12057c6a0693b2bd04ca17807a /test/notification_test.exs | |
parent | 99b0bc198921099816a5f809f11a7579b3993274 (diff) | |
parent | 60cc7d6c9a2ec60c3a98f0fe51d68d3dbd5d21c2 (diff) | |
download | pleroma-650853fc895fb2e21eac347e056eab98b842a3b7.tar.gz pleroma-650853fc895fb2e21eac347e056eab98b842a3b7.zip |
Merge remote-tracking branch 'remotes/origin/develop' into 1364-no-pushes-from-blocked-domains-users
# Conflicts:
# lib/pleroma/notification.ex
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 4e5559bb1..b668628ee 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 |