From 5ae1c26a19e531aa5517ad79cd50bae01c29a6f1 Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 19 Feb 2024 09:57:29 +0000 Subject: [PATCH] Update header and CYA label --- .../form/lettings/questions/starter_tenancy_type.rb | 4 ++-- .../lettings/questions/starter_tenancy_type_spec.rb | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/models/form/lettings/questions/starter_tenancy_type.rb b/app/models/form/lettings/questions/starter_tenancy_type.rb index fdffeaaa6..db67bbb7f 100644 --- a/app/models/form/lettings/questions/starter_tenancy_type.rb +++ b/app/models/form/lettings/questions/starter_tenancy_type.rb @@ -2,8 +2,8 @@ class Form::Lettings::Questions::StarterTenancyType < ::Form::Question def initialize(id, hsh, page) super @id = "tenancy" - @check_answer_label = form.start_year_after_2024? ? "What is the type of tenancy after the starter or introductory period has ended" : "Type of main tenancy after the starter period has ended?" - @header = "What is the type of tenancy after the starter period has ended?" + @check_answer_label = form.start_year_after_2024? ? "Type of main tenancy after the starter or introductory period has ended" : "Type of main tenancy after the starter period has ended" + @header = form.start_year_after_2024? ? "What is the type of tenancy after the starter or introductory period has ended?" : "What is the type of tenancy after the starter period has ended?" @type = "radio" @check_answers_card_number = 0 @hint_text = form.start_year_after_2024? ? "" : "This is also known as an ‘introductory period’." diff --git a/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb b/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb index e302d6050..3993e1b87 100644 --- a/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb +++ b/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb @@ -20,13 +20,17 @@ RSpec.describe Form::Lettings::Questions::StarterTenancyType, type: :model do end it "has the correct check answer label" do - expect(question.check_answer_label).to eq("Type of main tenancy after the starter period has ended?") + expect(question.check_answer_label).to eq("Type of main tenancy after the starter period has ended") end it "has the correct hint_text" do expect(question.hint_text).to eq("This is also known as an ‘introductory period’.") end + it "has the correct header" do + expect(question.header).to eq("What is the type of tenancy after the starter period has ended?") + end + it "has the correct answer options" do expect(question.answer_options).to eq( { @@ -62,13 +66,17 @@ RSpec.describe Form::Lettings::Questions::StarterTenancyType, type: :model do end it "has the correct check answer label" do - expect(question.check_answer_label).to eq("What is the type of tenancy after the starter or introductory period has ended") + expect(question.check_answer_label).to eq("Type of main tenancy after the starter or introductory period has ended") end it "has the correct updated hint_text" do expect(question.hint_text).to eq("") end + it "has the correct header" do + expect(question.header).to eq("What is the type of tenancy after the starter or introductory period has ended?") + end + it "has the correct answer options" do expect(question.answer_options).to eq( {