From c2c1b4dbb0bd84189c712679ec6c74b160f039c8 Mon Sep 17 00:00:00 2001 From: Jack <113976590+bibblobcode@users.noreply.github.com> Date: Thu, 26 Jan 2023 09:48:30 +0000 Subject: [PATCH] Add mortgage length hint (#1237) --- app/models/form/sales/questions/mortgage_length.rb | 1 + spec/models/form/sales/questions/mortgage_length_spec.rb | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/form/sales/questions/mortgage_length.rb b/app/models/form/sales/questions/mortgage_length.rb index 317489763..56a358f01 100644 --- a/app/models/form/sales/questions/mortgage_length.rb +++ b/app/models/form/sales/questions/mortgage_length.rb @@ -8,5 +8,6 @@ class Form::Sales::Questions::MortgageLength < ::Form::Question @min = 0 @width = 5 @suffix = " years" + @hint_text = "You should round up to the nearest year. Value should not exceed 60 years." end end diff --git a/spec/models/form/sales/questions/mortgage_length_spec.rb b/spec/models/form/sales/questions/mortgage_length_spec.rb index 519289607..e96a05174 100644 --- a/spec/models/form/sales/questions/mortgage_length_spec.rb +++ b/spec/models/form/sales/questions/mortgage_length_spec.rb @@ -32,7 +32,9 @@ RSpec.describe Form::Sales::Questions::MortgageLength, type: :model do end it "has the correct hint" do - expect(question.hint_text).to be_nil + expect(question.hint_text).to eq( + "You should round up to the nearest year. Value should not exceed 60 years.", + ) end it "has correct width" do