feat(routing): add epci to routable_types_de_champ
This commit is contained in:
parent
4d08d193ba
commit
cf7c7d9761
2 changed files with 4 additions and 2 deletions
|
@ -102,7 +102,8 @@ class TypeDeChamp < ApplicationRecord
|
|||
type_champs.fetch(:drop_down_list),
|
||||
type_champs.fetch(:communes),
|
||||
type_champs.fetch(:departements),
|
||||
type_champs.fetch(:regions)
|
||||
type_champs.fetch(:regions),
|
||||
type_champs.fetch(:epci)
|
||||
]
|
||||
|
||||
store_accessor :options,
|
||||
|
|
|
@ -950,9 +950,10 @@ describe ProcedureRevision do
|
|||
p.draft_revision.add_type_de_champ(type_champ: :departements, libelle: 'l3')
|
||||
p.draft_revision.add_type_de_champ(type_champ: :regions, libelle: 'l4')
|
||||
p.draft_revision.add_type_de_champ(type_champ: :communes, libelle: 'l5')
|
||||
p.draft_revision.add_type_de_champ(type_champ: :epci, libelle: 'l6')
|
||||
end
|
||||
end
|
||||
|
||||
it { expect(draft.routable_types_de_champ.pluck(:libelle)).to eq(['l2', 'l3', 'l4', 'l5']) }
|
||||
it { expect(draft.routable_types_de_champ.pluck(:libelle)).to eq(['l2', 'l3', 'l4', 'l5', 'l6']) }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue