Enable the Layout/AlignParameters cop

This commit is contained in:
gregoirenovel 2017-06-12 13:49:51 +02:00
parent 50fad54538
commit 9439e1abb1
39 changed files with 221 additions and 220 deletions

View file

@ -14,7 +14,8 @@ Layout/AlignHash:
Enabled: false Enabled: false
Layout/AlignParameters: Layout/AlignParameters:
Enabled: false Enabled: true
EnforcedStyle: with_fixed_indentation
Layout/BlockEndNewline: Layout/BlockEndNewline:
Enabled: false Enabled: false

View file

@ -7,6 +7,7 @@ class Admin::GestionnairesController < AdminController
current_administrateur.gestionnaires, current_administrateur.gestionnaires,
partial: "admin/gestionnaires/list", partial: "admin/gestionnaires/list",
array: true array: true
@gestionnaire ||= Gestionnaire.new @gestionnaire ||= Gestionnaire.new
end end

View file

@ -11,8 +11,6 @@ class AdministrationsController < ApplicationController
Administrateur.all.order(:email), Administrateur.all.order(:email),
partial: "administrations/list", partial: "administrations/list",
array: true array: true
end end
def create def create

View file

@ -11,5 +11,4 @@ class EtablissementSerializer < ActiveModel::Serializer
:code_postal, :code_postal,
:localite, :localite,
:code_insee_localite :code_insee_localite
end end

View file

@ -2,6 +2,4 @@ class ModuleApiCartoSerializer < ActiveModel::Serializer
attributes :use_api_carto, attributes :use_api_carto,
:quartiers_prioritaires, :quartiers_prioritaires,
:cadastre :cadastre
end end

View file

@ -10,7 +10,6 @@ class ProcedureSerializer < ActiveModel::Serializer
:geographic_information, :geographic_information,
:total_dossier :total_dossier
has_one :geographic_information, serializer: ModuleApiCartoSerializer has_one :geographic_information, serializer: ModuleApiCartoSerializer
has_many :types_de_champ, serializer: TypeDeChampSerializer has_many :types_de_champ, serializer: TypeDeChampSerializer
has_many :types_de_champ_private, serializer: TypeDeChampSerializer has_many :types_de_champ_private, serializer: TypeDeChampSerializer

View file

@ -14,11 +14,14 @@ describe Backoffice::PreferenceListDossierController, type: :controller do
describe '#POST add' do describe '#POST add' do
subject { post :add, subject { post :add,
params: {libelle: libelle, params: {
libelle: libelle,
table: table, table: table,
attr: attr, attr: attr,
attr_decorate: attr_decorate, attr_decorate: attr_decorate,
bootstrap_lg: bootstrap_lg} } bootstrap_lg: bootstrap_lg
}
}
it { expect(subject.status).to eq 200 } it { expect(subject.status).to eq 200 }
it { expect { subject }.to change(PreferenceListDossier, :count).by(1) } it { expect { subject }.to change(PreferenceListDossier, :count).by(1) }

View file

@ -13,10 +13,13 @@ describe Backoffice::PrivateFormulairesController, type: :controller do
describe '#PATCH update' do describe '#PATCH update' do
subject { patch :update, subject { patch :update,
params: {dossier_id: dossier.id, params: {
dossier_id: dossier.id,
champs: { champs: {
"'#{dossier.champs_private.first.id}'" => dossier_champs_first "'#{dossier.champs_private.first.id}'" => dossier_champs_first
}} } }
}
}
before do before do
subject subject

View file

@ -65,8 +65,7 @@ describe 'admin/previsualisations/show.html.haml', type: :view do
context 'les valeurs sont réaffichées si elles sont présentes dans la BDD' do context 'les valeurs sont réaffichées si elles sont présentes dans la BDD' do
let!(:dossier) do let!(:dossier) do
create(:dossier, create(:dossier, user: user)
user: user)
end end
before do before do