From 371f355719378a1ecf929bc56441493f8a708b32 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 20 Nov 2023 04:08:54 -0500 Subject: [PATCH] Reduce `.times` usage in `AccountStatusesCleanupPolicy` (#27947) --- spec/models/account_statuses_cleanup_policy_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/models/account_statuses_cleanup_policy_spec.rb b/spec/models/account_statuses_cleanup_policy_spec.rb index 7405bdfa2d7..74fff30c95a 100644 --- a/spec/models/account_statuses_cleanup_policy_spec.rb +++ b/spec/models/account_statuses_cleanup_policy_spec.rb @@ -280,10 +280,10 @@ RSpec.describe AccountStatusesCleanupPolicy do let(:account_statuses_cleanup_policy) { Fabricate(:account_statuses_cleanup_policy, account: account) } before do - 4.times { faved_primary.increment_count!(:favourites_count) } - 5.times { faved_secondary.increment_count!(:favourites_count) } - 4.times { reblogged_primary.increment_count!(:reblogs_count) } - 5.times { reblogged_secondary.increment_count!(:reblogs_count) } + faved_primary.status_stat.update(favourites_count: 4) + faved_secondary.status_stat.update(favourites_count: 5) + reblogged_primary.status_stat.update(reblogs_count: 4) + reblogged_secondary.status_stat.update(reblogs_count: 5) end context 'when passed a max_id' do