Browse Source

CLDC-4402: lint

CLDC-4402-audit-start-year-2024-or-later-usage
samyou-softwire 12 hours ago
parent
commit
9cee36e26e
  1. 6
      spec/models/form/lettings/questions/waityear_spec.rb
  2. 2
      spec/models/form_spec.rb

6
spec/models/form/lettings/questions/waityear_spec.rb

@ -14,6 +14,8 @@ RSpec.describe Form::Lettings::Questions::Waityear, type: :model do
allow(form).to receive(:start_year_2025_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
allow(form).to receive(:start_year_2025_or_later?).and_return(true)
allow(form).to receive(:start_year_2025_or_later?).and_return(true)
end
it "has correct page" do
@ -44,10 +46,6 @@ RSpec.describe Form::Lettings::Questions::Waityear, type: :model do
expect(question.check_answers_card_number).to eq(0)
end
before do
allow(form).to receive(:start_year_2025_or_later?).and_return(true)
end
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"13" => { "value" => "Household not on the housing register (or waiting list) in this area" },

2
spec/models/form_spec.rb

@ -71,8 +71,6 @@ RSpec.describe Form, type: :model do
describe ".previous_page" do
context "when the current page is not a value check page" do
let!(:subsection) { form.get_subsection("setup") }
it "returns the previous page if the page is routed to" do
page = form.get_page("rent_type")
expect(form.previous_page_id(page, lettings_log, user)).to eq("tenancy_start_date")

Loading…
Cancel
Save