diff options
author | eugenijm <eugenijm@protonmail.com> | 2020-04-30 15:02:35 +0300 |
---|---|---|
committer | eugenijm <eugenijm@protonmail.com> | 2020-04-30 18:38:19 +0300 |
commit | bef34568f0d005baabca266b99ac0f6e620e6899 (patch) | |
tree | 2dfa0f76a576739d9de29ff27a35f02fe4f5b00d /test | |
parent | 4c4344b7b17a2ddb1c597b059e0a7dcc043e02b2 (diff) | |
download | pleroma-bef34568f0d005baabca266b99ac0f6e620e6899.tar.gz pleroma-bef34568f0d005baabca266b99ac0f6e620e6899.zip |
Dismiss the follow request notification on rejection
Diffstat (limited to 'test')
-rw-r--r-- | test/notification_test.exs | 10 |
1 files changed, 10 insertions, 0 deletions
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 |