diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-03-03 20:25:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 20:25:15 +0100 |
commit | c2a046ded1d47e2504df05568e34bc6a2a6dc810 (patch) | |
tree | 8b36e3310d6fd141a10752752f88242f9138e876 /spec | |
parent | 3a6451c867595fd58998ee1706589b15a69d993b (diff) |
Fix “Remove all followers from the selected domains” being more destructive than it claims (#23805)
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/relationships_controller_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/controllers/relationships_controller_spec.rb b/spec/controllers/relationships_controller_spec.rb index 39f455e03..53a5daa51 100644 --- a/spec/controllers/relationships_controller_spec.rb +++ b/spec/controllers/relationships_controller_spec.rb @@ -58,7 +58,7 @@ describe RelationshipsController do end context 'when select parameter is provided' do - subject { patch :update, params: { form_account_batch: { account_ids: [poopfeast.id] }, block_domains: '' } } + subject { patch :update, params: { form_account_batch: { account_ids: [poopfeast.id] }, remove_domains_from_followers: '' } } it 'soft-blocks followers from selected domains' do poopfeast.follow!(user.account) @@ -69,6 +69,15 @@ describe RelationshipsController do expect(poopfeast.following?(user.account)).to be false end + it 'does not unfollow users from selected domains' do + user.account.follow!(poopfeast) + + sign_in user, scope: :user + subject + + expect(user.account.following?(poopfeast)).to be true + end + include_examples 'authenticate user' include_examples 'redirects back to followers page' end |