X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fnotification_test.exs;h=69f426e4d9b2d493901c0ba369952a934aad5cfd;hb=b078e0567dbecc768f88d991a2565141eb9e8c50;hp=7f359711f940a84799a7cdcca95b6bb8f17b234e;hpb=769d95644daf07bf27fb483e91d0e793eaa18bd8;p=akkoma diff --git a/test/notification_test.exs b/test/notification_test.exs index 7f359711f..69f426e4d 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -47,6 +47,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 @@ -466,6 +469,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