|
|
@ -18,14 +18,15 @@ RSpec.describe SuspendAccountService, type: :service do
|
|
|
|
account.suspend!
|
|
|
|
account.suspend!
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it "unmerges from local followers' feeds" do
|
|
|
|
it 'unmerges from feeds of local followers and preserves suspended flag' do
|
|
|
|
subject
|
|
|
|
expect { subject }
|
|
|
|
|
|
|
|
.to_not change_suspended_flag
|
|
|
|
expect(FeedManager.instance).to have_received(:unmerge_from_home).with(account, local_follower)
|
|
|
|
expect(FeedManager.instance).to have_received(:unmerge_from_home).with(account, local_follower)
|
|
|
|
expect(FeedManager.instance).to have_received(:unmerge_from_list).with(account, list)
|
|
|
|
expect(FeedManager.instance).to have_received(:unmerge_from_list).with(account, list)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it 'does not change the “suspended” flag' do
|
|
|
|
def change_suspended_flag
|
|
|
|
expect { subject }.to_not change(account, :suspended?)
|
|
|
|
change(account, :suspended?)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|