From 447e4971e43e6e2b7cd7b7596e3b8a8e15362635 Mon Sep 17 00:00:00 2001 From: Arthur Campbell Date: Mon, 20 Mar 2023 17:18:18 +0000 Subject: [PATCH] increase minimum allowed value for mortgage --- app/models/form/sales/questions/mortgage_amount.rb | 2 +- spec/models/form/sales/questions/mortgage_amount_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/form/sales/questions/mortgage_amount.rb b/app/models/form/sales/questions/mortgage_amount.rb index 12959709a..9b199b2aa 100644 --- a/app/models/form/sales/questions/mortgage_amount.rb +++ b/app/models/form/sales/questions/mortgage_amount.rb @@ -5,7 +5,7 @@ class Form::Sales::Questions::MortgageAmount < ::Form::Question @check_answer_label = "Mortgage amount" @header = "What is the mortgage amount?" @type = "numeric" - @min = 0 + @min = 1 @width = 5 @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." diff --git a/spec/models/form/sales/questions/mortgage_amount_spec.rb b/spec/models/form/sales/questions/mortgage_amount_spec.rb index 328406ecd..758101867 100644 --- a/spec/models/form/sales/questions/mortgage_amount_spec.rb +++ b/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) } it "has correct page" do - expect(question.page).to eq(page) + expect(question.page).to be(page) end it "has the correct id" do @@ -36,7 +36,7 @@ RSpec.describe Form::Sales::Questions::MortgageAmount, type: :model do end it "has correct width" do - expect(question.width).to eq(5) + expect(question.width).to be(5) end it "has correct prefix" do @@ -44,6 +44,6 @@ RSpec.describe Form::Sales::Questions::MortgageAmount, type: :model do end it "has correct min" do - expect(question.min).to eq(0) + expect(question.min).to be(1) end end