diff --git a/app/models/type_de_champ.rb b/app/models/type_de_champ.rb index a6697bec0..a8ceaa202 100644 --- a/app/models/type_de_champ.rb +++ b/app/models/type_de_champ.rb @@ -266,6 +266,7 @@ class TypeDeChamp < ApplicationRecord TypeDeChamp.type_champs.fetch(:regions), TypeDeChamp.type_champs.fetch(:departements), TypeDeChamp.type_champs.fetch(:communes), + TypeDeChamp.type_champs.fetch(:address), TypeDeChamp.type_champs.fetch(:date), TypeDeChamp.type_champs.fetch(:datetime), TypeDeChamp.type_champs.fetch(:yes_no), diff --git a/spec/models/prefill_params_spec.rb b/spec/models/prefill_params_spec.rb index ccea47657..e7d45dfb7 100644 --- a/spec/models/prefill_params_spec.rb +++ b/spec/models/prefill_params_spec.rb @@ -140,6 +140,7 @@ RSpec.describe PrefillParams do it_behaves_like "a champ public value that is authorized", :drop_down_list, "value" it_behaves_like "a champ public value that is authorized", :departements, "03" it_behaves_like "a champ public value that is authorized", :communes, ['01', '01457'] + it_behaves_like "a champ public value that is authorized", :address, "20 avenue de Ségur 75007 Paris" it_behaves_like "a champ public value that is authorized", :annuaire_education, "0050009H" it_behaves_like "a champ public value that is authorized", :multiple_drop_down_list, ["val1", "val2"] it_behaves_like "a champ public value that is authorized", :dossier_link, "1" @@ -183,6 +184,7 @@ RSpec.describe PrefillParams do it_behaves_like "a champ private value that is authorized", :siret, "13002526500013" it_behaves_like "a champ private value that is authorized", :departements, "03" it_behaves_like "a champ private value that is authorized", :communes, ['01', '01457'] + it_behaves_like "a champ private value that is authorized", :address, "20 avenue de Ségur 75007 Paris" it_behaves_like "a champ private value that is authorized", :annuaire_education, "0050009H" it_behaves_like "a champ private value that is authorized", :multiple_drop_down_list, ["val1", "val2"] it_behaves_like "a champ private value that is authorized", :dossier_link, "1" @@ -220,7 +222,6 @@ RSpec.describe PrefillParams do it_behaves_like "a champ public value that is unauthorized", :pole_emploi, "value" it_behaves_like "a champ public value that is unauthorized", :mesri, "value" it_behaves_like "a champ public value that is unauthorized", :carte, "value" - it_behaves_like "a champ public value that is unauthorized", :address, "value" it_behaves_like "a champ public value that is unauthorized", :pays, "value" it_behaves_like "a champ public value that is unauthorized", :regions, "value" it_behaves_like "a champ public value that is unauthorized", :departements, "value" diff --git a/spec/models/type_de_champ_spec.rb b/spec/models/type_de_champ_spec.rb index d6d364759..ebd4ba125 100644 --- a/spec/models/type_de_champ_spec.rb +++ b/spec/models/type_de_champ_spec.rb @@ -249,6 +249,7 @@ describe TypeDeChamp do it_behaves_like "a prefillable type de champ", :type_de_champ_regions it_behaves_like "a prefillable type de champ", :type_de_champ_departements it_behaves_like "a prefillable type de champ", :type_de_champ_communes + it_behaves_like "a prefillable type de champ", :type_de_champ_address it_behaves_like "a prefillable type de champ", :type_de_champ_yes_no it_behaves_like "a prefillable type de champ", :type_de_champ_checkbox it_behaves_like "a prefillable type de champ", :type_de_champ_drop_down_list @@ -271,7 +272,6 @@ describe TypeDeChamp do it_behaves_like "a non-prefillable type de champ", :type_de_champ_pole_emploi it_behaves_like "a non-prefillable type de champ", :type_de_champ_mesri it_behaves_like "a non-prefillable type de champ", :type_de_champ_carte - it_behaves_like "a non-prefillable type de champ", :type_de_champ_address end describe '#normalize_libelle' do