0
0
Fork 0

Fix “Remove all followers from the selected domains” being more destructive than it claims (#23805)

This commit is contained in:
Claire 2023-03-03 20:25:15 +01:00 committed by GitHub
parent 3a6451c867
commit c2a046ded1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 10 deletions

View file

@ -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