mirror of
https://github.com/kikobar/mastodon.git
synced 2024-12-24 14:54:13 +00:00
Autofix Rubocop Security/IoMethods (#23757)
This commit is contained in:
parent
9909b4b653
commit
35d032500b
|
@ -1956,13 +1956,6 @@ Rails/WhereExists:
|
|||
- 'spec/services/purge_domain_service_spec.rb'
|
||||
- 'spec/services/unallow_domain_service_spec.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Security/IoMethods:
|
||||
Exclude:
|
||||
- 'spec/controllers/admin/export_domain_allows_controller_spec.rb'
|
||||
- 'spec/controllers/admin/export_domain_blocks_controller_spec.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Style/CaseLikeIf:
|
||||
|
|
|
@ -14,7 +14,7 @@ RSpec.describe Admin::ExportDomainAllowsController, type: :controller do
|
|||
|
||||
get :export, params: { format: :csv }
|
||||
expect(response).to have_http_status(200)
|
||||
expect(response.body).to eq(IO.read(File.join(file_fixture_path, 'domain_allows.csv')))
|
||||
expect(response.body).to eq(File.read(File.join(file_fixture_path, 'domain_allows.csv')))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -30,7 +30,7 @@ RSpec.describe Admin::ExportDomainAllowsController, type: :controller do
|
|||
# Domains should now be added
|
||||
get :export, params: { format: :csv }
|
||||
expect(response).to have_http_status(200)
|
||||
expect(response.body).to eq(IO.read(File.join(file_fixture_path, 'domain_allows.csv')))
|
||||
expect(response.body).to eq(File.read(File.join(file_fixture_path, 'domain_allows.csv')))
|
||||
end
|
||||
|
||||
it 'displays error on no file selected' do
|
||||
|
|
|
@ -16,7 +16,7 @@ RSpec.describe Admin::ExportDomainBlocksController, type: :controller do
|
|||
|
||||
get :export, params: { format: :csv }
|
||||
expect(response).to have_http_status(200)
|
||||
expect(response.body).to eq(IO.read(File.join(file_fixture_path, 'domain_blocks.csv')))
|
||||
expect(response.body).to eq(File.read(File.join(file_fixture_path, 'domain_blocks.csv')))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue