Browse Source

CLDC-4325: Fix hhmemb spec

pull/3250/head
samyou-softwire 2 weeks ago
parent
commit
62d24533dd
  1. 8
      spec/models/form/lettings/questions/hhmemb_spec.rb

8
spec/models/form/lettings/questions/hhmemb_spec.rb

@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Questions::Hhmemb, type: :model do
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
let(:start_year_2026_or_later?) { true }
let(:startdate) { current_collection_start_date }
let(:start_date) { current_collection_start_date }
let(:form) { instance_double(Form, start_date:, start_year_2026_or_later?: start_year_2026_or_later?) }
before do
@ -39,7 +39,7 @@ RSpec.describe Form::Lettings::Questions::Hhmemb, type: :model do
context "when in 2025", { year: 25 } do
let(:start_year_2026_or_later?) { false }
let(:startdate) { collection_start_date_for_year(2025) }
let(:start_date) { collection_start_date_for_year(2025) }
it "does not have check answers card title" do
expect(question.check_answers_card_title).to be_nil
@ -52,14 +52,14 @@ RSpec.describe Form::Lettings::Questions::Hhmemb, type: :model do
context "when in 2026", { year: 26 } do
let(:start_year_2026_or_later?) { true }
let(:startdate) { collection_start_date_for_year(2026) }
let(:start_date) { collection_start_date_for_year(2026) }
it "has correct check answers card title" do
expect(question.check_answers_card_title).to eq("Household")
end
it "has the correct question number" do
expect(question.question_number).to eq(30)
expect(question.question_number).to eq(29)
end
end
end

Loading…
Cancel
Save