demarches-normaliennes/spec/views/new_administrateur/procedures/edit.html.haml_spec.rb
Pierre de La Morinerie 43569f687e specs: use fixture_file_upload rather than Rack::Test::UploadedFile
This is mostly for consistency (both styles were used before).

Note: we still have to use `Rack::Test::UploadedFile.new` in factories,
because of https://github.com/thoughtbot/factory_bot/issues/385.
2020-07-01 11:13:45 +02:00

15 lines
468 B
Ruby

describe 'new_administrateur/procedures/edit.html.haml' do
let(:logo) { fixture_file_upload('spec/fixtures/files/logo_test_procedure.png', 'image/png') }
let(:procedure) { create(:procedure, logo: logo, lien_site_web: 'http://some.website') }
before do
assign(:procedure, procedure)
render
end
context 'when procedure logo is present' do
it 'display on the page' do
expect(rendered).to have_selector('.procedure-logos')
end
end
end