|
|
|
@ -186,9 +186,9 @@ RSpec.describe Validations::SetupValidations do |
|
|
|
|
|
|
|
|
|
|
|
context "with a scheme that is reactivating soon" do |
|
|
|
context "with a scheme that is reactivating soon" do |
|
|
|
let(:scheme) { create(:scheme, created_at: Time.zone.local(2022, 4, 1)) } |
|
|
|
let(:scheme) { create(:scheme, created_at: Time.zone.local(2022, 4, 1)) } |
|
|
|
let!(:location) { FactoryBot.create(:location, scheme:) } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
before do |
|
|
|
before do |
|
|
|
|
|
|
|
FactoryBot.create(:location, scheme:) |
|
|
|
create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 4), reactivation_date: Time.zone.local(2022, 8, 4), scheme:) |
|
|
|
create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 4), reactivation_date: Time.zone.local(2022, 8, 4), scheme:) |
|
|
|
scheme.reload |
|
|
|
scheme.reload |
|
|
|
end |
|
|
|
end |
|
|
|
@ -211,9 +211,9 @@ RSpec.describe Validations::SetupValidations do |
|
|
|
|
|
|
|
|
|
|
|
context "with a scheme that has many reactivations soon" do |
|
|
|
context "with a scheme that has many reactivations soon" do |
|
|
|
let(:scheme) { create(:scheme, created_at: Time.zone.local(2022, 4, 1)) } |
|
|
|
let(:scheme) { create(:scheme, created_at: Time.zone.local(2022, 4, 1)) } |
|
|
|
let!(:location) { FactoryBot.create(:location, scheme:) } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
before do |
|
|
|
before do |
|
|
|
|
|
|
|
FactoryBot.create(:location, scheme:) |
|
|
|
create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 4), reactivation_date: Time.zone.local(2022, 8, 4), scheme:) |
|
|
|
create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 4), reactivation_date: Time.zone.local(2022, 8, 4), scheme:) |
|
|
|
create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 2), reactivation_date: Time.zone.local(2022, 8, 3), scheme:) |
|
|
|
create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 2), reactivation_date: Time.zone.local(2022, 8, 3), scheme:) |
|
|
|
create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 1), reactivation_date: Time.zone.local(2022, 9, 4), scheme:) |
|
|
|
create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 1), reactivation_date: Time.zone.local(2022, 9, 4), scheme:) |
|
|
|
|