use drop_down_options when possible
This commit is contained in:
parent
77b754a08d
commit
8b5f689a67
14 changed files with 81 additions and 92 deletions
|
@ -15,7 +15,7 @@ class TypesDeChampEditor::ConditionsComponentPreview < ViewComponent::Preview
|
|||
def with_conditions
|
||||
surface = TypeDeChamp.create(type_champ: :integer_number, libelle: 'surface')
|
||||
appartement = TypeDeChamp.create(type_champ: :yes_no, libelle: 'appartement')
|
||||
type_appartement = TypeDeChamp.create(type_champ: :drop_down_list, libelle: 'type', drop_down_list_value: "T1\r\nT2\r\nT3")
|
||||
type_appartement = TypeDeChamp.create(type_champ: :drop_down_list, libelle: 'type', drop_down_options: ["T1", "T2", "T3"])
|
||||
upper_tdcs = [surface, appartement, type_appartement]
|
||||
|
||||
condition = ds_and([
|
||||
|
|
|
@ -19,7 +19,7 @@ describe Procedure::OneGroupeManagementComponent, type: :component do
|
|||
procedure.draft_revision.add_type_de_champ({
|
||||
type_champ: :drop_down_list,
|
||||
libelle: 'Votre ville',
|
||||
drop_down_list_value: "Paris\nLyon\nMarseille"
|
||||
drop_down_options: ["Paris", "Lyon", "Marseille"]
|
||||
})
|
||||
procedure.publish_revision!
|
||||
procedure.reload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue