Audofix Rubocop Style/WordArray (#23739)

This commit is contained in:
Nick Schonning 2023-02-20 00:14:10 -05:00 committed by GitHub
parent 4552685f6b
commit bf785df9fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 27 additions and 50 deletions

View file

@ -29,7 +29,7 @@ RSpec.describe ActivityPub::FetchFeaturedTagsCollectionService, type: :service d
end
it 'sets expected tags as pinned tags' do
expect(actor.featured_tags.map(&:display_name)).to match_array ['Foo', 'bar', 'baZ']
expect(actor.featured_tags.map(&:display_name)).to match_array %w(Foo bar baZ)
end
end

View file

@ -12,7 +12,7 @@ RSpec.describe ActivityPub::ProcessAccountService, type: :service do
attachment: [
{ type: 'PropertyValue', name: 'Pronouns', value: 'They/them' },
{ type: 'PropertyValue', name: 'Occupation', value: 'Unit test' },
{ type: 'PropertyValue', name: 'non-string', value: ['foo', 'bar'] },
{ type: 'PropertyValue', name: 'non-string', value: %w(foo bar) },
],
}.with_indifferent_access
end

View file

@ -50,9 +50,9 @@ RSpec.describe DeleteAccountService, type: :service do
it 'deletes associated target notifications' do
expect { subject }.to change {
[
'poll', 'favourite', 'status', 'mention', 'follow'
].map { |type| Notification.where(type: type).count }
%w(
poll favourite status mention follow
).map { |type| Notification.where(type: type).count }
}.from([1, 1, 1, 1, 1]).to([0, 0, 0, 0, 0])
end
end