Autofix Rubocop Lint/ParenthesesAsGroupedExpression (#23682)
parent
e5cf23cf3a
commit
a7db0b41cd
|
@ -289,15 +289,6 @@ Lint/OrAssignmentToConstant:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/sanitize_ext/sanitize_config.rb'
|
- 'lib/sanitize_ext/sanitize_config.rb'
|
||||||
|
|
||||||
# Offense count: 6
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
Lint/ParenthesesAsGroupedExpression:
|
|
||||||
Exclude:
|
|
||||||
- 'spec/controllers/api/v1/admin/accounts_controller_spec.rb'
|
|
||||||
- 'spec/controllers/api/v2/admin/accounts_controller_spec.rb'
|
|
||||||
- 'spec/lib/activitypub/activity/flag_spec.rb'
|
|
||||||
- 'spec/models/import_spec.rb'
|
|
||||||
|
|
||||||
# Offense count: 3
|
# Offense count: 3
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
# This cop supports safe autocorrection (--autocorrect).
|
||||||
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
||||||
|
|
|
@ -65,7 +65,7 @@ RSpec.describe Api::V1::Admin::AccountsController, type: :controller do
|
||||||
it "returns the correct accounts (#{expected_results.inspect})" do
|
it "returns the correct accounts (#{expected_results.inspect})" do
|
||||||
json = body_as_json
|
json = body_as_json
|
||||||
|
|
||||||
expect(json.map { |a| a[:id].to_i }).to eq (expected_results.map { |symbol| send(symbol).id })
|
expect(json.map { |a| a[:id].to_i }).to eq(expected_results.map { |symbol| send(symbol).id })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -65,7 +65,7 @@ RSpec.describe Api::V2::Admin::AccountsController, type: :controller do
|
||||||
it "returns the correct accounts (#{expected_results.inspect})" do
|
it "returns the correct accounts (#{expected_results.inspect})" do
|
||||||
json = body_as_json
|
json = body_as_json
|
||||||
|
|
||||||
expect(json.map { |a| a[:id].to_i }).to eq (expected_results.map { |symbol| send(symbol).id })
|
expect(json.map { |a| a[:id].to_i }).to eq(expected_results.map { |symbol| send(symbol).id })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -110,7 +110,7 @@ RSpec.describe ActivityPub::Activity::Flag do
|
||||||
|
|
||||||
describe '#perform with a defined uri' do
|
describe '#perform with a defined uri' do
|
||||||
subject { described_class.new(json, sender) }
|
subject { described_class.new(json, sender) }
|
||||||
let (:flag_id) { 'http://example.com/reports/1' }
|
let(:flag_id) { 'http://example.com/reports/1' }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
subject.perform
|
subject.perform
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe Import, type: :model do
|
RSpec.describe Import, type: :model do
|
||||||
let (:account) { Fabricate(:account) }
|
let(:account) { Fabricate(:account) }
|
||||||
let (:type) { 'following' }
|
let(:type) { 'following' }
|
||||||
let (:data) { attachment_fixture('imports.txt') }
|
let(:data) { attachment_fixture('imports.txt') }
|
||||||
|
|
||||||
describe 'validations' do
|
describe 'validations' do
|
||||||
it 'has a valid parameters' do
|
it 'has a valid parameters' do
|
||||||
|
|
Loading…
Reference in New Issue