2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-03-06 17:05:37 +01:00
|
|
|
describe 'users/dossiers/papertrail', type: :view do
|
2022-05-04 08:57:14 +02:00
|
|
|
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
|