Enable the Layout/SpaceAfterColon cop
This commit is contained in:
parent
e8422d3904
commit
f605cd35ac
6 changed files with 8 additions and 8 deletions
|
@ -155,7 +155,7 @@ Layout/RescueEnsureAlignment:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Layout/SpaceAfterColon:
|
Layout/SpaceAfterColon:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Layout/SpaceAfterComma:
|
Layout/SpaceAfterComma:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
namespace :'2017_10_30_copy_commentaire_piece_justificative_to_file' do
|
namespace :'2017_10_30_copy_commentaire_piece_justificative_to_file' do
|
||||||
task set: :environment 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..."
|
puts "#{commentaires_to_process.count} commentaires to process..."
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,12 @@ describe API::V1::ProceduresController, type: :controller do
|
||||||
end
|
end
|
||||||
context 'when procedure does not belong to administrateur' do
|
context 'when procedure does not belong to administrateur' do
|
||||||
let(:procedure) { create(:procedure, administrateur: create(:administrateur)) }
|
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) }
|
it { expect(subject.status).to eq(404) }
|
||||||
end
|
end
|
||||||
context 'when procedure exist' do
|
context 'when procedure exist' do
|
||||||
let(:procedure) { create(:procedure, :with_two_type_de_piece_justificative, :with_type_de_champ, administrateur: admin) }
|
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
|
it 'return REST code 200', :show_in_doc do
|
||||||
expect(subject.status).to eq(200)
|
expect(subject.status).to eq(200)
|
||||||
|
@ -25,7 +25,7 @@ describe API::V1::ProceduresController, type: :controller do
|
||||||
describe 'body' do
|
describe 'body' do
|
||||||
let(:module_api_carto) { create(:module_api_carto, use_api_carto: true, quartiers_prioritaires: true, cadastre: true) }
|
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(: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] }
|
subject { JSON.parse(response.body, symbolize_names: true)[:procedure] }
|
||||||
|
|
||||||
it { expect(subject[:id]).to eq(procedure.id) }
|
it { expect(subject[:id]).to eq(procedure.id) }
|
||||||
|
|
|
@ -8,7 +8,7 @@ describe Users::Dossiers::AddSiretController, type: :controller do
|
||||||
sign_in dossier.user
|
sign_in dossier.user
|
||||||
end
|
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
|
context 'when dossier is not attached at a procedure with individual siret attribut' do
|
||||||
it { is_expected.to redirect_to users_dossiers_path }
|
it { is_expected.to redirect_to users_dossiers_path }
|
||||||
|
|
|
@ -6,7 +6,7 @@ describe Users::Dossiers::CommentairesController, type: :controller do
|
||||||
|
|
||||||
describe '#POST create' do
|
describe '#POST create' do
|
||||||
subject {
|
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
|
dossier.reload
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ RSpec.shared_examples 'not owner of dossier' do |controller, redirect|
|
||||||
let(:dossier_2) { create(:dossier) }
|
let(:dossier_2) { create(:dossier) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
get controller, params:{dossier_id: dossier_2.id}
|
get controller, params: {dossier_id: dossier_2.id}
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'redirect to home page' do
|
it 'redirect to home page' do
|
||||||
|
|
Loading…
Reference in a new issue