From 8961f278bd4d6ff3957da1bb171eb6f42041cfd2 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Mon, 22 Aug 2022 16:40:56 +0100 Subject: [PATCH] Hardcode test attributes to avoid heisenspec --- spec/models/scheme_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/models/scheme_spec.rb b/spec/models/scheme_spec.rb index 14d60cf1f..3aff19b36 100644 --- a/spec/models/scheme_spec.rb +++ b/spec/models/scheme_spec.rb @@ -25,8 +25,8 @@ RSpec.describe Scheme, type: :model do describe "scopes" do let!(:scheme_1) { FactoryBot.create(:scheme) } let!(:scheme_2) { FactoryBot.create(:scheme) } - let!(:location) { FactoryBot.create(:location, scheme: scheme_1) } - let!(:location_2) { FactoryBot.create(:location, scheme: scheme_2) } + let!(:location) { FactoryBot.create(:location, :export, scheme: scheme_1) } + let!(:location_2) { FactoryBot.create(:location, scheme: scheme_2, postcode: "NE4 6TR", name: "second location") } context "when filtering by id" do it "returns case insensitive matching records" do