dossier: export PJs from private champs

Fix #5297
This commit is contained in:
Pierre de La Morinerie 2020-06-24 13:21:51 +00:00
parent 6f14e7783f
commit acc1cb1abd
2 changed files with 9 additions and 1 deletions

View file

@ -16,6 +16,14 @@ describe ActiveStorage::DownloadableFile do
it { expect(list.length).to eq 1 }
end
context 'when there is a private piece_justificative' do
before do
dossier.champs_private << create(:champ, :piece_justificative, :with_piece_justificative_file, private: true)
end
it { expect(list.length).to eq 1 }
end
context 'when there is a repetition bloc' do
let(:champ) { build(:champ_repetition_with_piece_jointe) }
let(:dossier) { create(:dossier, :en_construction, champs: [champ]) }