|
|
|
|
@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::AboutDepositWithoutDiscount, type: :model do
|
|
|
|
|
let(:subsection) { instance_double(Form::Subsection) } |
|
|
|
|
|
|
|
|
|
before do |
|
|
|
|
allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false)) |
|
|
|
|
allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1))) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "has correct subsection" do |
|
|
|
|
@ -53,7 +53,7 @@ RSpec.describe Form::Sales::Pages::AboutDepositWithoutDiscount, type: :model do
|
|
|
|
|
|
|
|
|
|
context "when it's a 2024 form" do |
|
|
|
|
before do |
|
|
|
|
allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: true)) |
|
|
|
|
allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: true, start_date: Time.zone.local(2024, 4, 1))) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "has correct depends_on" do |
|
|
|
|
|