diff --git a/spec/factories/champ.rb b/spec/factories/champ.rb index 2ef037c257a..9301d11ea90 100644 --- a/spec/factories/champ.rb +++ b/spec/factories/champ.rb @@ -163,7 +163,7 @@ factory :champ_do_not_use_rna, class: 'Champs::RNAChamp' do value { 'W173847273' } - value_json { AddressProxy::ADDRESS_PARTS.index_by(&:itself).merge(title: "LA PRÉVENTION ROUTIERE") } + value_json { AddressProxy::ADDRESS_PARTS.index_by(&:itself).merge(title: "LA PRÉVENTION ROUTIERE", department_code: 'department_code') } end factory :champ_do_not_use_engagement_juridique, class: 'Champs::EngagementJuridiqueChamp' do @@ -176,7 +176,7 @@ factory :champ_do_not_use_rnf, class: 'Champs::RNFChamp' do value { '075-FDD-00003-01' } external_id { '075-FDD-00003-01' } - value_json { AddressProxy::ADDRESS_PARTS.index_by(&:itself).merge(title: "Fondation SFR") } + value_json { AddressProxy::ADDRESS_PARTS.index_by(&:itself).merge(title: "Fondation SFR", department_code: 'department_code') } end factory :champ_do_not_use_expression_reguliere, class: 'Champs::ExpressionReguliereChamp' do diff --git a/spec/models/columns/champ_column_spec.rb b/spec/models/columns/champ_column_spec.rb index 1c00d56ae95..071386ef211 100644 --- a/spec/models/columns/champ_column_spec.rb +++ b/spec/models/columns/champ_column_spec.rb @@ -55,8 +55,8 @@ expect_type_de_champ_values('mesri', eq([nil])) expect_type_de_champ_values('cojo', eq([nil])) expect_type_de_champ_values('expression_reguliere', eq([nil])) - expect_type_de_champ_values('rna', eq(["W173847273", "postal_code", "city_name", "departement_code", "region_name", "LA PRÉVENTION ROUTIERE"])) - expect_type_de_champ_values('rnf', eq(["075-FDD-00003-01", "postal_code", "city_name", "departement_code", "region_name", "Fondation SFR"])) + expect_type_de_champ_values('rna', eq(["W173847273", "postal_code", "city_name", "department_code", "region_name", "LA PRÉVENTION ROUTIERE"])) + expect_type_de_champ_values('rnf', eq(["075-FDD-00003-01", "postal_code", "city_name", "department_code", "region_name", "Fondation SFR"])) end end diff --git a/spec/services/dossier_filter_service_spec.rb b/spec/services/dossier_filter_service_spec.rb index 9ae26622ce6..1ec37d6956c 100644 --- a/spec/services/dossier_filter_service_spec.rb +++ b/spec/services/dossier_filter_service_spec.rb @@ -602,8 +602,8 @@ def to_filter((label, filter)) = FilteredColumn.new(column: procedure.find_colum let(:filter) { ["rna – Département", value] } before do - kept_dossier.project_champs_public.find { _1.stable_id == 1 }.update(value_json: { "departement_code" => value }) - create(:dossier, procedure:).project_champs_public.find { _1.stable_id == 1 }.update(value_json: { "departement_code" => "unknown" }) + kept_dossier.project_champs_public.find { _1.stable_id == 1 }.update(value_json: { "department_code" => value }) + create(:dossier, procedure:).project_champs_public.find { _1.stable_id == 1 }.update(value_json: { "department_code" => "unknown" }) end it { is_expected.to contain_exactly(kept_dossier.id) } diff --git a/spec/services/dossier_projection_service_spec.rb b/spec/services/dossier_projection_service_spec.rb index 9029846d070..bab226ef762 100644 --- a/spec/services/dossier_projection_service_spec.rb +++ b/spec/services/dossier_projection_service_spec.rb @@ -244,7 +244,7 @@ let(:label) { "SIRET – Département" } before do - dossier.project_champs_public.first.update(value_json: { 'departement_code': '38' }) + dossier.project_champs_public.first.update(value_json: { 'department_code': '38' }) end it { is_expected.to eq('38') } diff --git a/spec/system/instructeurs/procedure_filters_spec.rb b/spec/system/instructeurs/procedure_filters_spec.rb index dac3aeaace3..4d12b767137 100644 --- a/spec/system/instructeurs/procedure_filters_spec.rb +++ b/spec/system/instructeurs/procedure_filters_spec.rb @@ -147,8 +147,8 @@ "street_name" => "fake", "street_number" => "fake", "street_address" => "fake", - "departement_code" => "37", - "departement_name" => "Indre-et-Loire" + "department_code" => "37", + "department_name" => "Indre-et-Loire" } ) rna_champ.reload