diff --git a/spec/factories/location.rb b/spec/factories/location.rb index 31859a0c1..4d3fb1e4c 100644 --- a/spec/factories/location.rb +++ b/spec/factories/location.rb @@ -8,7 +8,7 @@ FactoryBot.define do mobility_type { %w[A M N W X].sample } location_code { "E09000033" } location_admin_district { "Westminster" } - startdate { Faker::Date.between(from: 6.months.ago, to: Date.today) } + startdate { Faker::Date.between(from: 6.months.ago, to: Time.zone.today) } scheme trait :export do postcode { "SW1A 2AA" } diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index 4c55a7168..b0ab10d18 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -175,7 +175,7 @@ RSpec.describe "Schemes scheme Features" do context "when there are locations that belong to the selected scheme" do let!(:schemes) { FactoryBot.create_list(:scheme, 5) } let(:scheme) { schemes.first } - let!(:locations) { FactoryBot.create_list(:location, 3, scheme:, postcode: "AA11AA", startdate: Time.utc(2022,1,1)) } + let!(:locations) { FactoryBot.create_list(:location, 3, scheme:, postcode: "AA11AA", startdate: Time.utc(2022, 1, 1)) } before do visit("schemes")