demarches-normaliennes/spec/lib/active_storage/downloadable_file_spec.rb

13 lines
443 B
Ruby
Raw Normal View History

describe ActiveStorage::DownloadableFile do
let(:dossier) { create(:dossier, :en_construction) }
2022-04-05 14:20:59 +02:00
subject(:list) { ActiveStorage::DownloadableFile.create_list_from_dossiers(Dossier.where(id: dossier.id)) }
2022-04-05 14:20:59 +02:00
describe 'create_list_from_dossiers' do
context 'when no piece_justificative is present' do
2021-03-08 11:35:20 +01:00
it { expect(list.length).to eq 1 }
it { expect(list.first[0].name).to eq "pdf_export_for_instructeur" }
end
end
end