let epci champ be prefillable
This commit is contained in:
parent
f1ecee4240
commit
0f483668cf
3 changed files with 6 additions and 2 deletions
|
@ -268,7 +268,8 @@ class TypeDeChamp < ApplicationRecord
|
|||
TypeDeChamp.type_champs.fetch(:checkbox),
|
||||
TypeDeChamp.type_champs.fetch(:drop_down_list),
|
||||
TypeDeChamp.type_champs.fetch(:regions),
|
||||
TypeDeChamp.type_champs.fetch(:departements)
|
||||
TypeDeChamp.type_champs.fetch(:departements),
|
||||
TypeDeChamp.type_champs.fetch(:epci)
|
||||
])
|
||||
end
|
||||
|
||||
|
|
|
@ -127,6 +127,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", :regions, "03"
|
||||
it_behaves_like "a champ public value that is authorized", :departements, "03"
|
||||
it_behaves_like "a champ public value that is authorized", :epci, ['01', '200042935']
|
||||
|
||||
it_behaves_like "a champ private value that is authorized", :text, "value"
|
||||
it_behaves_like "a champ private value that is authorized", :textarea, "value"
|
||||
|
@ -145,7 +146,8 @@ RSpec.describe PrefillParams do
|
|||
it_behaves_like "a champ private value that is authorized", :checkbox, "false"
|
||||
it_behaves_like "a champ private value that is authorized", :drop_down_list, "value"
|
||||
it_behaves_like "a champ private value that is authorized", :regions, "93"
|
||||
it_behaves_like "a champ public value that is authorized", :departements, "03"
|
||||
it_behaves_like "a champ private value that is authorized", :departements, "03"
|
||||
it_behaves_like "a champ private value that is authorized", :epci, ['01', '200042935']
|
||||
|
||||
it_behaves_like "a champ public value that is unauthorized", :decimal_number, "non decimal string"
|
||||
it_behaves_like "a champ public value that is unauthorized", :integer_number, "non integer string"
|
||||
|
|
|
@ -251,6 +251,7 @@ describe TypeDeChamp do
|
|||
it_behaves_like "a prefillable type de champ", :type_de_champ_drop_down_list
|
||||
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_epci
|
||||
|
||||
it_behaves_like "a non-prefillable type de champ", :type_de_champ_number
|
||||
it_behaves_like "a non-prefillable type de champ", :type_de_champ_communes
|
||||
|
|
Loading…
Reference in a new issue