X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fnotification_test.exs;h=526f43fab7a53f1313bd602e2f0f392a6c70820c;hb=59bdef0c337f1892282e245c5a236680af8e0318;hp=421b7fc4076ebec4110665d9391bcb64517df1ef;hpb=805ab86933d90d4284c83e4a8ebfd6bf4b0395b3;p=akkoma diff --git a/test/notification_test.exs b/test/notification_test.exs index 421b7fc40..526f43fab 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -10,6 +10,7 @@ defmodule Pleroma.NotificationTest do alias Pleroma.FollowingRelationship alias Pleroma.Notification + alias Pleroma.Repo alias Pleroma.Tests.ObanHelpers alias Pleroma.User alias Pleroma.Web.ActivityPub.ActivityPub @@ -305,6 +306,14 @@ defmodule Pleroma.NotificationTest do assert {:ok, []} == Notification.create_notifications(status) end + + test "it disables notifications from people who are invisible" do + author = insert(:user, invisible: true) + user = insert(:user) + + {:ok, status} = CommonAPI.post(author, %{status: "hey @#{user.nickname}"}) + refute Notification.create_notification(status, user) + end end describe "follow / follow_request notifications" do