lint: fix Rubocop warnings

The Rails/UniqueValidationWithoutIndex rule is disabled for now, but
we'll need to re-enable it (and fix the underlying issues) after the
migration to Rails 6.
This commit is contained in:
Pierre de La Morinerie 2020-06-22 14:58:55 +00:00
parent 6cc76cdf05
commit 35240e2219
3 changed files with 5 additions and 7 deletions

View file

@ -340,9 +340,6 @@ Lint/EmptyInterpolation:
Lint/EmptyWhen:
Enabled: true
Lint/EndInMethod:
Enabled: true
Lint/EnsureReturn:
Enabled: false
@ -794,6 +791,9 @@ Rails/TimeZone:
Rails/UniqBeforePluck:
Enabled: true
Rails/UniqueValidationWithoutIndex:
Enabled: false
Rails/UnknownEnv:
Enabled: false

View file

@ -92,9 +92,7 @@ class Admin::ProceduresController < AdminController
flash.now.notice = "La démarche a correctement été clonée vers le nouvel administrateur."
respond_to do |format|
format.js
end
respond_to(&:js)
end
end

View file

@ -40,7 +40,7 @@ describe Admin::AttestationTemplatesController, type: :controller do
context 'with an interlaced png' do
let(:upload_params) { { logo: interlaced_logo } }
#it { expect(procedure.attestation_template.logo.download).to eq(uninterlaced_logo.read) }
it { expect(procedure.attestation_template.logo.download).to eq(uninterlaced_logo.read) }
end
context 'if an attestation template does not exist on the procedure' do