|
45 | 45 |
|
46 | 46 | it "returns just the current year for ctc and valid filing years for gyr when using DateTime.now" do |
47 | 47 | fake_time = Rails.configuration.tax_year_filing_seasons[2020][1] + 3.years - 1.day |
| 48 | + # this is May 16, 2024 in which the deadline has passes and thus should show 3 years of filing |
48 | 49 | Timecop.freeze(fake_time) do |
49 | 50 | expect(described_class.new(:ctc).filing_years).to eq [2023] |
50 | | - expect(described_class.new(:gyr).filing_years).to eq [2023, 2022, 2021, 2020] |
| 51 | + expect(described_class.new(:gyr).filing_years).to eq [2023, 2022, 2021] |
51 | 52 | end |
52 | 53 | end |
53 | 54 |
|
|
66 | 67 | end |
67 | 68 | end |
68 | 69 |
|
69 | | - context "GYR 2025 after tax deadline before end of in progress intake" do |
| 70 | + context "GYR 2025 after tax deadline but before end of login" do |
70 | 71 | it "returns 2022, 2023, 2024" do |
71 | 72 | fake_time = DateTime.parse("2025-06-23") |
72 | 73 |
|
73 | 74 | expect(described_class.new(:gyr).filing_years(fake_time)).to eq [2024, 2023, 2022] |
74 | 75 | end |
75 | 76 | end |
76 | 77 |
|
77 | | - context "GYR 2025 after end of in progress intake" do |
78 | | - it "returns 2022, 2023, 2024" do |
| 78 | + context "GYR 2025 after end of login" do |
| 79 | + it "returns 2022, 2023, 2024 and 2025" do |
79 | 80 | fake_time = DateTime.parse("2025-12-21") |
80 | 81 |
|
81 | | - expect(described_class.new(:gyr).filing_years(fake_time)).to eq [2024, 2023, 2022] |
| 82 | + expect(described_class.new(:gyr).filing_years(fake_time)).to eq [2025, 2024, 2023, 2022] |
82 | 83 | end |
83 | 84 | end |
84 | 85 | end |
|
0 commit comments