demarches-normaliennes/spec/views/dossiers/dossier_vide.pdf.prawn_spec.rb
Pierre de La Morinerie 59d8479b85 dossiers: fix dossier_vide with drop_down_list
Previously a drop-down list with an ["Autre", "__other__"] value crashed
the PDF generation.
2022-05-04 16:34:37 +02:00

16 lines
413 B
Ruby

describe 'dossiers/dossier_vide.pdf.prawn', type: :view do
let(:procedure) { create(:procedure, :with_all_champs, :with_drop_down_list) }
let(:dossier) { create(:dossier, procedure: procedure) }
before do
assign(:procedure, procedure)
assign(:dossier, dossier)
end
subject { render }
it 'renders a PDF document with empty fields' do
subject
expect(rendered).to be_present
end
end