Enable the Layout/IndentationConsistency cop

This commit is contained in:
gregoirenovel 2018-01-15 19:12:15 +01:00
parent 99a49a8144
commit 1e71188d4d
8 changed files with 43 additions and 41 deletions

View file

@ -112,7 +112,7 @@ Layout/IndentHeredoc:
Enabled: true
Layout/IndentationConsistency:
Enabled: false
Enabled: true
Layout/IndentationWidth:
Enabled: true

View file

@ -26,7 +26,7 @@ class PieceJustificativeUploader < BaseUploader
if original_filename.present? || model.content_secure_token
if Features.remote_storage
filename = "#{model.class.to_s.underscore}-#{secure_token}.#{file.extension.downcase}"
else original_filename
else
filename = "#{model.class.to_s.underscore}.#{file.extension.downcase}"
end
end

View file

@ -24,8 +24,7 @@ describe CARTO::SGMAP::Cadastre::Adapter do
it { expect(subject.size).to eq 9 }
it do
expect(subject.keys).to eq
[
expect(subject.keys).to eq [
:surface_intersection,
:surface_parcelle,
:numero,

View file

@ -94,9 +94,10 @@ describe Gestionnaire, type: :model do
context 'when gestionnaire follow any dossier' do
it { is_expected.to eq 0 }
it { expect(gestionnaire.follows.count).to eq 0 }
it { expect_any_instance_of(Dossier::ActiveRecord_AssociationRelation).not_to receive(:inject)
it do
expect_any_instance_of(Dossier::ActiveRecord_AssociationRelation).not_to receive(:inject)
subject
}
end
end
context 'when gestionnaire follow any dossier into the procedure past in params' do
@ -106,9 +107,10 @@ describe Gestionnaire, type: :model do
it { is_expected.to eq 0 }
it { expect(gestionnaire.follows.count).to eq 1 }
it { expect_any_instance_of(Dossier::ActiveRecord_AssociationRelation).not_to receive(:inject)
it do
expect_any_instance_of(Dossier::ActiveRecord_AssociationRelation).not_to receive(:inject)
subject
}
end
end
context 'when gestionnaire follow a dossier with a notification into the procedure past in params' do
@ -121,9 +123,10 @@ describe Gestionnaire, type: :model do
it { is_expected.to eq 1 }
it { expect(gestionnaire.follows.count).to eq 1 }
it { expect_any_instance_of(Dossier::ActiveRecord_AssociationRelation).to receive(:inject)
it do
expect_any_instance_of(Dossier::ActiveRecord_AssociationRelation).to receive(:inject)
subject
}
end
end
end