|
|
|
@ -5,7 +5,13 @@ RSpec.describe Form::Lettings::Pages::RentType, type: :model do |
|
|
|
|
|
|
|
|
|
|
|
let(:page_id) { nil } |
|
|
|
let(:page_id) { nil } |
|
|
|
let(:page_definition) { nil } |
|
|
|
let(:page_definition) { nil } |
|
|
|
let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) } |
|
|
|
let(:subsection) { instance_double(Form::Subsection) } |
|
|
|
|
|
|
|
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
before do |
|
|
|
|
|
|
|
allow(subsection).to receive(:form).and_return(form) |
|
|
|
|
|
|
|
allow(form).to receive(:start_year_after_2024?).and_return(true) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "has correct subsection" do |
|
|
|
it "has correct subsection" do |
|
|
|
expect(page.subsection).to eq(subsection) |
|
|
|
expect(page.subsection).to eq(subsection) |
|
|
|
|