|
|
@ -12,7 +12,7 @@ RSpec.describe Form::Sales::Questions::Mortgageused, type: :model do |
|
|
|
|
|
|
|
|
|
|
|
context "when the form start year is 2024" do |
|
|
|
context "when the form start year is 2024" do |
|
|
|
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) } |
|
|
|
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) } |
|
|
|
let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form:)) } |
|
|
|
let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form:, id: "shared_ownership")) } |
|
|
|
let(:saledate) { Time.zone.local(2024, 5, 1) } |
|
|
|
let(:saledate) { Time.zone.local(2024, 5, 1) } |
|
|
|
let(:ownershipsch) { 1 } |
|
|
|
let(:ownershipsch) { 1 } |
|
|
|
|
|
|
|
|
|
|
@ -94,7 +94,7 @@ RSpec.describe Form::Sales::Questions::Mortgageused, type: :model do |
|
|
|
|
|
|
|
|
|
|
|
context "when the form start year is 2025" do |
|
|
|
context "when the form start year is 2025" do |
|
|
|
let(:form) { instance_double(Form, start_date: Time.zone.local(2025, 4, 1)) } |
|
|
|
let(:form) { instance_double(Form, start_date: Time.zone.local(2025, 4, 1)) } |
|
|
|
let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form:)) } |
|
|
|
let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form:, id: "shared_ownership")) } |
|
|
|
let(:saledate) { Time.zone.local(2025, 5, 1) } |
|
|
|
let(:saledate) { Time.zone.local(2025, 5, 1) } |
|
|
|
|
|
|
|
|
|
|
|
before do |
|
|
|
before do |
|
|
@ -106,7 +106,7 @@ RSpec.describe Form::Sales::Questions::Mortgageused, type: :model do |
|
|
|
let(:ownershipsch) { 2 } |
|
|
|
let(:ownershipsch) { 2 } |
|
|
|
|
|
|
|
|
|
|
|
it "shows the correct question number" do |
|
|
|
it "shows the correct question number" do |
|
|
|
expect(question.question_number).to eq 104 |
|
|
|
expect(question.question_number).to eq 106 |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "does not show the don't know option" do |
|
|
|
it "does not show the don't know option" do |
|
|
|