2023-05-03 11:35:15 +02:00
|
|
|
RSpec.describe 'administrateurs/procedures/edit', type: :view do
|
2023-05-31 17:04:21 +02:00
|
|
|
let(:procedure) { create(:procedure, lien_site_web: 'http://some.website') }
|
2022-12-19 16:37:31 +01:00
|
|
|
|
|
|
|
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
|
2017-04-04 15:27:04 +02:00
|
|
|
end
|