add ChampColumn

This commit is contained in:
simon lehericey 2024-10-31 18:29:23 +01:00
parent a5b8b936d5
commit d03d5d0dae
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5
7 changed files with 208 additions and 184 deletions

View file

@ -25,7 +25,7 @@ describe Instructeurs::ColumnFilterValueComponent, type: :component do
let(:types_de_champ_public) { [{ type: :drop_down_list, libelle: 'Votre ville', options: ['Paris', 'Lyon', 'Marseille'] }] }
let(:procedure) { create(:procedure, :published, types_de_champ_public:) }
let(:drop_down_stable_id) { procedure.active_revision.types_de_champ.first.stable_id }
let(:column) { Column.new(procedure_id:, table: 'type_de_champ', scope: nil, column: drop_down_stable_id) }
let(:column) { procedure.find_column(label: 'Votre ville') }
it 'find most recent tdc' do
is_expected.to eq(['Paris', 'Lyon', 'Marseille'])