Fix Performance/MapCompact cop (#24797)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
0664704cd9
commit
9f5deb310b
16 changed files with 25 additions and 44 deletions
|
@ -15,7 +15,7 @@ RSpec.describe StatusRelationshipsPresenter do
|
|||
let(:presenter) { StatusRelationshipsPresenter.new(statuses, current_account_id, **options) }
|
||||
let(:current_account_id) { Fabricate(:account).id }
|
||||
let(:statuses) { [Fabricate(:status)] }
|
||||
let(:status_ids) { statuses.map(&:id) + statuses.map(&:reblog_of_id).compact }
|
||||
let(:status_ids) { statuses.map(&:id) + statuses.filter_map(&:reblog_of_id) }
|
||||
let(:default_map) { { 1 => true } }
|
||||
|
||||
context 'when options are not set' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue