Browse Source

Add mortgage length hint (#1237)

pull/1201/head
Jack 2 years ago committed by GitHub
parent
commit
c2c1b4dbb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      app/models/form/sales/questions/mortgage_length.rb
  2. 4
      spec/models/form/sales/questions/mortgage_length_spec.rb

1
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

4
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

Loading…
Cancel
Save