use config.ds_opendata_enabled

don't use anymore opendata feature flag
This commit is contained in:
Christophe Robillard 2022-12-19 16:37:31 +01:00
parent edffd0a7a8
commit a0da04e83c
2 changed files with 21 additions and 1 deletions

View file

@ -62,7 +62,7 @@
= f.label :lien_dpo, 'Lien ou email pour contacter le Délégué à la Protection des Données (DPO)'
= f.text_field :lien_dpo, class: 'form-control'
- if @procedure.feature_enabled?(:opendata)
- if Rails.application.config.ds_opendata_enabled
%h3.header-subsection= t(:opendata_header, scope: [:administrateurs, :informations])
%p.notice= t(:opendata_notice_html, scope: [:administrateurs, :informations])
%p.notice= t(:opendata, scope: [:administrateurs, :informations])

View file

@ -10,4 +10,24 @@ describe 'administrateurs/procedures/edit.html.haml' do
expect(rendered).to have_selector('.procedure-logos')
end
end
context 'when opendata is enabled' do
it 'asks for opendata' do
Rails.application.config.ds_opendata_enabled = true
assign(:procedure, procedure)
render
expect(rendered).to have_content('Open data')
end
end
context 'when opendata is disabled' do
it 'asks for opendata' do
Rails.application.config.ds_opendata_enabled = nil
assign(:procedure, procedure)
render
expect(rendered).not_to have_content('Open data')
end
end
end