X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fnotification_test.exs;h=c3d70c51febd92ef719e066f004d4ca3a016f4dc;hb=dbcfac11b45b367185a3b18a2db3e3fb07e8f20d;hp=7cfa40c5178d5e4798b4628ac25ebb83493b4de6;hpb=f497cf2f7c21196c4d633ddf0d14f0a4ede00cea;p=akkoma diff --git a/test/notification_test.exs b/test/notification_test.exs index 7cfa40c51..c3d70c51f 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