aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-05-02 12:24:49 +0000
committerrinpatch <rinpatch@sdf.org>2020-05-02 12:24:49 +0000
commit9e3ec582807e11400cb90a18089de78bbaf921b7 (patch)
treecf995632fe3c7866294c28e0d86c0cd2f023293d /test
parent8ea522b4b6a9efa9ef1c3f885944c12495114652 (diff)
parentcf5ca7e45b7a5df18717c8b6ea0afa045e341f65 (diff)
downloadpleroma-9e3ec582807e11400cb90a18089de78bbaf921b7.tar.gz
Merge branch 'follow-request-notifications' into 'develop'
Follow request notifications enforcement See merge request pleroma/pleroma!2451
Diffstat (limited to 'test')
-rw-r--r--test/notification_test.exs20
1 files changed, 1 insertions, 19 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs
index 0e9ffcb18..601a6c0ca 100644
--- a/test/notification_test.exs
+++ b/test/notification_test.exs
@@ -312,9 +312,7 @@ defmodule Pleroma.NotificationTest do
})
end
- test "if `follow_request` notifications are enabled, " <>
- "it creates `follow_request` notification for pending Follow activity" do
- clear_config([:notifications, :enable_follow_request_notifications], true)
+ test "it creates `follow_request` notification for pending Follow activity" do
user = insert(:user)
followed_user = insert(:user, locked: true)
@@ -333,21 +331,6 @@ defmodule Pleroma.NotificationTest do
assert %{type: "follow"} = NotificationView.render("show.json", render_opts)
end
- test "if `follow_request` notifications are disabled, " <>
- "it does NOT create `follow*` notification for pending Follow activity" do
- clear_config([:notifications, :enable_follow_request_notifications], false)
- user = insert(:user)
- followed_user = insert(:user, locked: true)
-
- {:ok, _, _, _activity} = CommonAPI.follow(user, followed_user)
- refute FollowingRelationship.following?(user, followed_user)
- assert [] = Notification.for_user(followed_user)
-
- # After request is accepted, no new notifications are generated:
- assert {:ok, _} = CommonAPI.accept_follow_request(user, followed_user)
- assert [] = Notification.for_user(followed_user)
- end
-
test "it doesn't create a notification for follow-unfollow-follow chains" do
user = insert(:user)
followed_user = insert(:user, locked: false)
@@ -364,7 +347,6 @@ defmodule Pleroma.NotificationTest do
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)