Fix (API Entreprise): test fails randomly

Don't assume array order, just check that all values are present
This commit is contained in:
François Vantomme 2021-05-07 10:41:45 +02:00 committed by Fabrice Gangler
parent 656068e53f
commit 99ce5195bc

View file

@ -15,6 +15,7 @@ RSpec.describe APIEntreprise::ExercicesJob, type: :job do
it 'updates etablissement' do
subject
expect(Etablissement.find(etablissement.id).exercices[0].ca).to eq('21009417')
ca_list = Etablissement.find(etablissement.id).exercices.map(&:ca)
expect(ca_list).to contain_exactly('21009417', '18968298', '17768838')
end
end