Browse Source

increase minimum allowed value for mortgage

pull/1445/head
Arthur Campbell 3 years ago
parent
commit
447e4971e4
  1. 2
      app/models/form/sales/questions/mortgage_amount.rb
  2. 6
      spec/models/form/sales/questions/mortgage_amount_spec.rb

2
app/models/form/sales/questions/mortgage_amount.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::MortgageAmount < ::Form::Question
@check_answer_label = "Mortgage amount" @check_answer_label = "Mortgage amount"
@header = "What is the mortgage amount?" @header = "What is the mortgage amount?"
@type = "numeric" @type = "numeric"
@min = 0 @min = 1
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@hint_text = "Enter the amount of mortgage agreed with the mortgage lender. Exclude any deposits or cash payments. Numeric in pounds. Rounded to the nearest pound." @hint_text = "Enter the amount of mortgage agreed with the mortgage lender. Exclude any deposits or cash payments. Numeric in pounds. Rounded to the nearest pound."

6
spec/models/form/sales/questions/mortgage_amount_spec.rb

@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Questions::MortgageAmount, type: :model do
let(:page) { instance_double(Form::Page) } let(:page) { instance_double(Form::Page) }
it "has correct page" do it "has correct page" do
expect(question.page).to eq(page) expect(question.page).to be(page)
end end
it "has the correct id" do it "has the correct id" do
@ -36,7 +36,7 @@ RSpec.describe Form::Sales::Questions::MortgageAmount, type: :model do
end end
it "has correct width" do it "has correct width" do
expect(question.width).to eq(5) expect(question.width).to be(5)
end end
it "has correct prefix" do it "has correct prefix" do
@ -44,6 +44,6 @@ RSpec.describe Form::Sales::Questions::MortgageAmount, type: :model do
end end
it "has correct min" do it "has correct min" do
expect(question.min).to eq(0) expect(question.min).to be(1)
end end
end end

Loading…
Cancel
Save