use config.ds_opendata_enabled
don't use anymore opendata feature flag
This commit is contained in:
parent
edffd0a7a8
commit
a0da04e83c
2 changed files with 21 additions and 1 deletions
|
@ -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])
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue