app: add controller and view to generate a deposit receipt

This commit is contained in:
Pierre de La Morinerie 2022-05-04 06:57:14 +00:00
parent fe56b7bb68
commit 9bc5364ca2
15 changed files with 235 additions and 1 deletions

View file

@ -0,0 +1,25 @@
describe 'users/dossiers/papertrail.pdf.prawn', type: :view do
before do
assign(:dossier, dossier)
end
subject { render }
context 'for a dossier with an individual' do
let(:dossier) { create(:dossier, :en_construction, :with_service, :with_individual) }
it 'renders a PDF document with the dossier state' do
subject
expect(rendered).to be_present
end
end
context 'for a dossier with a SIRET' do
let(:dossier) { create(:dossier, :en_construction, :with_service, :with_entreprise) }
it 'renders a PDF document with the dossier state' do
subject
expect(rendered).to be_present
end
end
end