X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fnotification_test.exs;h=0e9ffcb1824435d251d21416ae27ad3f29ec289c;hb=4dfc617cdf1c2579f4f941dcd0fa5c728178df06;hp=6ad824c57e1a4e39db0f75bfca20194ba541052d;hpb=e7fb593d130e0ad62e3690dce4a0913fe3d40ef0;p=akkoma diff --git a/test/notification_test.exs b/test/notification_test.exs index 6ad824c57..0e9ffcb18 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -362,6 +362,16 @@ defmodule Pleroma.NotificationTest do notification_id = notification.id assert [%{id: ^notification_id}] = Notification.for_user(followed_user) end + + test "dismisses the notification on follow request rejection" do + clear_config([:notifications, :enable_follow_request_notifications], true) + user = insert(:user, locked: true) + follower = insert(:user) + {:ok, _, _, _follow_activity} = CommonAPI.follow(follower, user) + assert [notification] = Notification.for_user(user) + {:ok, _follower} = CommonAPI.reject_follow_request(follower, user) + assert [] = Notification.for_user(user) + end end describe "get notification" do