summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-04-14 11:58:38 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-04-14 11:58:38 +0300
commit650853fc895fb2e21eac347e056eab98b842a3b7 (patch)
tree7df844177fb8aa12057c6a0693b2bd04ca17807a /test/notification_test.exs
parent99b0bc198921099816a5f809f11a7579b3993274 (diff)
parent60cc7d6c9a2ec60c3a98f0fe51d68d3dbd5d21c2 (diff)
downloadpleroma-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.exs13
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