From be6bb1a10d6f1f23151198c6487f44145a0692ee Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 6 Dec 2023 03:45:19 -0500 Subject: [PATCH] Remove double subject call in `services/suspend_account_service` spec (#28213) --- spec/services/suspend_account_service_spec.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spec/services/suspend_account_service_spec.rb b/spec/services/suspend_account_service_spec.rb index edb7050083..c258995b7e 100644 --- a/spec/services/suspend_account_service_spec.rb +++ b/spec/services/suspend_account_service_spec.rb @@ -18,14 +18,15 @@ RSpec.describe SuspendAccountService, type: :service do account.suspend! end - it "unmerges from local followers' feeds" do - subject + it 'unmerges from feeds of local followers and preserves suspended flag' do + 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_list).with(account, list) end - it 'does not change the “suspended” flag' do - expect { subject }.to_not change(account, :suspended?) + def change_suspended_flag + change(account, :suspended?) end end