From 0e3943934c27b426abffb44648f5ff0dbaeaf23d Mon Sep 17 00:00:00 2001 From: vacabor <166112501+vacabor@users.noreply.github.com> Date: Mon, 29 Jul 2024 21:12:10 +0100 Subject: [PATCH] Fix flakey spec --- spec/jobs/import_early_years_data_job_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/jobs/import_early_years_data_job_spec.rb b/spec/jobs/import_early_years_data_job_spec.rb index 87cd5418a8..44b3bf6a6a 100644 --- a/spec/jobs/import_early_years_data_job_spec.rb +++ b/spec/jobs/import_early_years_data_job_spec.rb @@ -27,8 +27,9 @@ it "associates local authourity correctly" do upload - expect(EarlyYearsData.first.nursery_name).to eq("Test Nursery") - expect(EarlyYearsData.first.local_authority).to eq(local_authority) + nursery = EarlyYearsData.find_by_urn("1234567") + expect(nursery.nursery_name).to eq("Test Nursery") + expect(nursery.local_authority).to eq(local_authority) end end