add fonction empty for cerfa
This commit is contained in:
parent
e2ff64a119
commit
1f960a4b43
3 changed files with 20 additions and 0 deletions
|
@ -9,4 +9,15 @@ describe Cerfa do
|
|||
it { is_expected.to belong_to(:dossier) }
|
||||
end
|
||||
|
||||
describe 'empty?' do
|
||||
subject { create(:cerfa, content: content)}
|
||||
context 'when content exist' do
|
||||
let(:content) { File.open('./spec/support/files/piece_jointe_388.pdf') }
|
||||
it { expect(subject).not_to be_empty }
|
||||
end
|
||||
context 'when content is nil' do
|
||||
let(:content) { nil }
|
||||
it { expect(subject).to be_empty }
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue