From 93ef0a02b7324e58b77756e01c7cef1c08ffeb40 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Tue, 23 Oct 2018 09:25:29 +0200 Subject: [PATCH] Remove unused lien_demarche from procedure --- spec/controllers/admin/procedures_controller_spec.rb | 6 ------ spec/factories/procedure.rb | 1 - spec/models/procedure_spec.rb | 6 ------ 3 files changed, 13 deletions(-) diff --git a/spec/controllers/admin/procedures_controller_spec.rb b/spec/controllers/admin/procedures_controller_spec.rb index b0215e956..18585d239 100644 --- a/spec/controllers/admin/procedures_controller_spec.rb +++ b/spec/controllers/admin/procedures_controller_spec.rb @@ -11,7 +11,6 @@ describe Admin::ProceduresController, type: :controller do let(:description) { 'Description de test' } let(:organisation) { 'Organisation de test' } let(:direction) { 'Direction de test' } - let(:lien_demarche) { 'http://localhost.com' } let(:cadre_juridique) { 'cadre juridique' } let(:use_api_carto) { '0' } let(:quartiers_prioritaires) { '0' } @@ -26,7 +25,6 @@ describe Admin::ProceduresController, type: :controller do description: description, organisation: organisation, direction: direction, - lien_demarche: lien_demarche, cadre_juridique: cadre_juridique, duree_conservation_dossiers_dans_ds: duree_conservation_dossiers_dans_ds, duree_conservation_dossiers_hors_ds: duree_conservation_dossiers_hors_ds, @@ -198,7 +196,6 @@ describe Admin::ProceduresController, type: :controller do it { expect(subject.description).to eq(description) } it { expect(subject.organisation).to eq(organisation) } it { expect(subject.direction).to eq(direction) } - it { expect(subject.lien_demarche).to eq(lien_demarche) } it { expect(subject.administrateur_id).to eq(admin.id) } it { expect(subject.duree_conservation_dossiers_dans_ds).to eq(duree_conservation_dossiers_dans_ds) } it { expect(subject.duree_conservation_dossiers_hors_ds).to eq(duree_conservation_dossiers_hors_ds) } @@ -270,7 +267,6 @@ describe Admin::ProceduresController, type: :controller do let(:description) { 'blabla' } let(:organisation) { 'plop' } let(:direction) { 'plap' } - let(:lien_demarche) { 'http://plip.com' } let(:use_api_carto) { '1' } let(:cadastre) { '1' } let(:duree_conservation_dossiers_dans_ds) { 7 } @@ -285,7 +281,6 @@ describe Admin::ProceduresController, type: :controller do it { expect(subject.description).to eq(description) } it { expect(subject.organisation).to eq(organisation) } it { expect(subject.direction).to eq(direction) } - it { expect(subject.lien_demarche).to eq(lien_demarche) } it { expect(subject.duree_conservation_dossiers_dans_ds).to eq(duree_conservation_dossiers_dans_ds) } it { expect(subject.duree_conservation_dossiers_hors_ds).to eq(duree_conservation_dossiers_hors_ds) } end @@ -349,7 +344,6 @@ describe Admin::ProceduresController, type: :controller do it { expect(subject.organisation).to eq procedure_params[:organisation] } it { expect(subject.direction).to eq procedure_params[:direction] } - it { expect(subject.lien_demarche).not_to eq procedure_params[:lien_demarche] } it { expect(subject.for_individual).not_to eq procedure_params[:for_individual] } it { expect(subject.individual_with_siret).not_to eq procedure_params[:individual_with_siret] } it { expect(subject.use_api_carto).not_to eq procedure_params[:module_api_carto_attributes][:use_api_carto] } diff --git a/spec/factories/procedure.rb b/spec/factories/procedure.rb index 2f548163d..a99134ccf 100644 --- a/spec/factories/procedure.rb +++ b/spec/factories/procedure.rb @@ -1,7 +1,6 @@ FactoryBot.define do sequence(:published_path) { |n| "fake_path#{n}" } factory :procedure do - lien_demarche { 'http://localhost' } sequence(:libelle) { |n| "Procedure #{n}" } description { "Demande de subvention à l'intention des associations" } organisation { "Orga DINSIC" } diff --git a/spec/models/procedure_spec.rb b/spec/models/procedure_spec.rb index cffd74f0d..a6b34fe02 100644 --- a/spec/models/procedure_spec.rb +++ b/spec/models/procedure_spec.rb @@ -164,12 +164,6 @@ describe Procedure do it { is_expected.to allow_value('Description Demande de subvention').for(:description) } end - context 'lien_demarche' do - it { is_expected.to allow_value(nil).for(:lien_demarche) } - it { is_expected.to allow_value('').for(:lien_demarche) } - it { is_expected.to allow_value('http://localhost').for(:lien_demarche) } - end - context 'organisation' do it { is_expected.to allow_value('URRSAF').for(:organisation) } end