summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2020-04-14 19:45:22 +0400
committerEgor Kislitsyn <egor@kislitsyn.com>2020-04-14 19:45:22 +0400
commit247e6fcb9039470875fa9cb6c3406b57235dd419 (patch)
tree50152e4b9b8aa53cf9dcbe237934c411fc1b242f /test/notification_test.exs
parent7e0b42d99f3eb9520bc29cc29c06512c55183482 (diff)
parentbf3afbc1a109e5965b335b21d4e7c522ad7a571c (diff)
downloadpleroma-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.exs13
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