ajout d'un test automatisé
This commit is contained in:
parent
9503a363e5
commit
789fcf72ca
2 changed files with 15 additions and 1 deletions
|
@ -24,5 +24,19 @@ describe ActiveStorage::DownloadableFile do
|
|||
expect(list.size).to eq(4)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when there is a message with no attachment' do
|
||||
let(:commentaire) { create(:commentaire) }
|
||||
let(:dossier) { commentaire.dossier }
|
||||
|
||||
it { expect(list.length).to be 0 }
|
||||
end
|
||||
|
||||
context 'when there is a message with an attachment' do
|
||||
let(:commentaire) { create(:commentaire, :with_file) }
|
||||
let(:dossier) { commentaire.dossier }
|
||||
|
||||
it { expect(list.length).to be 1 }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue