diff --git a/spec/models/organization_spec.rb b/spec/models/organization_spec.rb index ad40e1b7d6..854469d18f 100644 --- a/spec/models/organization_spec.rb +++ b/spec/models/organization_spec.rb @@ -404,9 +404,9 @@ it 'is the year of the earliest of donation, purchase, or distribution if they are earlier ' do freeze_time do - create(:donation, organization: organization, issued_at: DateTime.current.next_year - 1.day) - create(:purchase, organization: organization, issued_at: DateTime.current.next_year - 1.day) - create(:distribution, organization: organization, issued_at: DateTime.current.next_year - 1.day) + create(:donation, organization: organization, issued_at: 6.months.from_now) + create(:purchase, organization: organization, issued_at: 6.months.from_now) + create(:distribution, organization: organization, issued_at: 6.months.from_now) expect(organization.earliest_reporting_year).to eq(organization.created_at.year) create(:donation, organization: organization, issued_at: 5.years.ago) expect(organization.earliest_reporting_year).to eq(5.years.ago.year)