Enable the Layout/SpaceAfterColon cop

This commit is contained in:
gregoirenovel 2018-01-15 21:43:56 +01:00
parent e8422d3904
commit f605cd35ac
6 changed files with 8 additions and 8 deletions

View file

@ -155,7 +155,7 @@ Layout/RescueEnsureAlignment:
Enabled: true
Layout/SpaceAfterColon:
Enabled: false
Enabled: true
Layout/SpaceAfterComma:
Enabled: false

View file

@ -1,6 +1,6 @@
namespace :'2017_10_30_copy_commentaire_piece_justificative_to_file' do
task set: :environment do
commentaires_to_process = Commentaire.where(file:nil).where.not(piece_justificative_id: nil).reorder(id: :desc)
commentaires_to_process = Commentaire.where(file: nil).where.not(piece_justificative_id: nil).reorder(id: :desc)
puts "#{commentaires_to_process.count} commentaires to process..."

View file

@ -11,12 +11,12 @@ describe API::V1::ProceduresController, type: :controller do
end
context 'when procedure does not belong to administrateur' do
let(:procedure) { create(:procedure, administrateur: create(:administrateur)) }
subject { get :show, params:{id: procedure, token: admin.api_token }}
subject { get :show, params: {id: procedure, token: admin.api_token }}
it { expect(subject.status).to eq(404) }
end
context 'when procedure exist' do
let(:procedure) { create(:procedure, :with_two_type_de_piece_justificative, :with_type_de_champ, administrateur: admin) }
subject { get :show, params:{id: procedure, token: admin.api_token }}
subject { get :show, params: {id: procedure, token: admin.api_token }}
it 'return REST code 200', :show_in_doc do
expect(subject.status).to eq(200)
@ -25,7 +25,7 @@ describe API::V1::ProceduresController, type: :controller do
describe 'body' do
let(:module_api_carto) { create(:module_api_carto, use_api_carto: true, quartiers_prioritaires: true, cadastre: true) }
let(:procedure) { create(:procedure, :with_type_de_champ, :with_two_type_de_piece_justificative, module_api_carto: module_api_carto, administrateur: admin) }
let(:response) { get :show, params:{id: procedure.id, token: admin.api_token }}
let(:response) { get :show, params: {id: procedure.id, token: admin.api_token }}
subject { JSON.parse(response.body, symbolize_names: true)[:procedure] }
it { expect(subject[:id]).to eq(procedure.id) }

View file

@ -8,7 +8,7 @@ describe Users::Dossiers::AddSiretController, type: :controller do
sign_in dossier.user
end
subject { get :show, params:{dossier_id: dossier.id }}
subject { get :show, params: {dossier_id: dossier.id }}
context 'when dossier is not attached at a procedure with individual siret attribut' do
it { is_expected.to redirect_to users_dossiers_path }

View file

@ -6,7 +6,7 @@ describe Users::Dossiers::CommentairesController, type: :controller do
describe '#POST create' do
subject {
post :create, params:{dossier_id: dossier.id, texte_commentaire: texte_commentaire}
post :create, params: {dossier_id: dossier.id, texte_commentaire: texte_commentaire}
dossier.reload
}

View file

@ -4,7 +4,7 @@ RSpec.shared_examples 'not owner of dossier' do |controller, redirect|
let(:dossier_2) { create(:dossier) }
before do
get controller, params:{dossier_id: dossier_2.id}
get controller, params: {dossier_id: dossier_2.id}
end
it 'redirect to home page' do