From ce91d14d48e897a9586e126364e9c3df3f9e2880 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 8 Nov 2023 08:03:44 -0500 Subject: [PATCH] Fix `Style/WordArray` cop (#27770) --- .rubocop_todo.yml | 2 -- spec/controllers/settings/imports_controller_spec.rb | 2 +- spec/models/form/import_spec.rb | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 36d543b13..4d753a71a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -616,5 +616,3 @@ Style/TrailingCommaInHashLiteral: Style/WordArray: Exclude: - 'app/helpers/languages_helper.rb' - - 'spec/controllers/settings/imports_controller_spec.rb' - - 'spec/models/form/import_spec.rb' diff --git a/spec/controllers/settings/imports_controller_spec.rb b/spec/controllers/settings/imports_controller_spec.rb index 35d2f0819..900d0eb90 100644 --- a/spec/controllers/settings/imports_controller_spec.rb +++ b/spec/controllers/settings/imports_controller_spec.rb @@ -194,7 +194,7 @@ RSpec.describe Settings::ImportsController do let!(:rows) do [ { 'acct' => 'foo@bar' }, - { 'acct' => 'user@bar', 'show_reblogs' => false, 'notify' => true, 'languages' => ['fr', 'de'] }, + { 'acct' => 'user@bar', 'show_reblogs' => false, 'notify' => true, 'languages' => %w(fr de) }, ].map { |data| Fabricate(:bulk_import_row, bulk_import: bulk_import, data: data) } end diff --git a/spec/models/form/import_spec.rb b/spec/models/form/import_spec.rb index 2b70e396b..872697485 100644 --- a/spec/models/form/import_spec.rb +++ b/spec/models/form/import_spec.rb @@ -296,7 +296,7 @@ RSpec.describe Form::Import do it_behaves_like 'on successful import', 'following', 'merge', 'following_accounts.csv', [ { 'acct' => 'user@example.com', 'show_reblogs' => true, 'notify' => false, 'languages' => nil }, - { 'acct' => 'user@test.com', 'show_reblogs' => true, 'notify' => true, 'languages' => ['en', 'fr'] }, + { 'acct' => 'user@test.com', 'show_reblogs' => true, 'notify' => true, 'languages' => %w(en fr) }, ] it_behaves_like 'on successful import', 'muting', 'merge', 'muted_accounts.csv', [