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