dossier: refactor piece_justificative specs

Use `eq` rather than `be` for integers.
This commit is contained in:
Pierre de La Morinerie 2020-06-24 10:50:43 +00:00
parent df13bce0e0
commit b83a76a0a1

View file

@ -13,7 +13,7 @@ describe ActiveStorage::DownloadableFile do
dossier.champs << create(:champ, :piece_justificative, :with_piece_justificative_file)
end
it { expect(list.length).to be 1 }
it { expect(list.length).to eq 1 }
end
context 'when there is a repetition bloc' do
@ -21,7 +21,7 @@ describe ActiveStorage::DownloadableFile do
let(:dossier) { create(:dossier, :en_construction, champs: [champ]) }
it 'should have 4 piece_justificatives' do
expect(list.size).to eq(4)
expect(list.size).to eq 4
end
end
@ -29,14 +29,14 @@ describe ActiveStorage::DownloadableFile do
let(:commentaire) { create(:commentaire) }
let(:dossier) { commentaire.dossier }
it { expect(list.length).to be 0 }
it { expect(list.length).to eq 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 }
it { expect(list.length).to eq 1 }
end
end
end