Browse Source

Fix dates to depend of collections in homepage tests (#2880)

CLDC-3817-bu-income-range-bug
kosiakkatrina 2 weeks ago committed by GitHub
parent
commit
dab1ee25db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      spec/presenters/homepage_presenter_spec.rb

4
spec/presenters/homepage_presenter_spec.rb

@ -5,8 +5,8 @@ RSpec.describe HomepagePresenter do
let(:user) { create(:user, organisation:) }
let(:in_crossover_period) { true }
let(:presenter) { described_class.new(user) }
let(:date_this_year) { Time.zone.today }
let(:date_last_year) { Time.zone.today - 1.year }
let(:date_this_year) { FormHandler.instance.current_collection_start_date }
let(:date_last_year) { FormHandler.instance.previous_collection_start_date }
let(:expected_count) { rand 1..10 }
before do

Loading…
Cancel
Save