@ -6,7 +6,6 @@ class Form::Sales::Questions::MortgageAmount < ::Form::Question
@header="What is the mortgage amount?"
@type="numeric"
@min=1
@step=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."
@ -6,7 +6,6 @@ class Form::Sales::Questions::PurchasePrice < ::Form::Question
@header="What is the full purchase price?"
@type="numeric"
@min=0
@step=0.01
@width=5
@prefix="£"
@hint_text="For all schemes, including Right to Acquire (RTA), Right to Buy (RTB), Voluntary Right to Buy (VRTB) or Preserved Right to Buy (PRTB) sales, enter the full price of the property without any discount"
@ -6,7 +6,6 @@ class Form::Sales::Questions::Value < ::Form::Question
@header="What was the full purchase price?"
@type="numeric"
@min=0
@step=1
@width=5
@prefix="£"
@hint_text="Enter the full purchase price of the property before any discounts are applied. For shared ownership, enter the full purchase price paid for 100% equity (this is equal to the value of the share owned by the PRP plus the value bought by the purchaser)"
elsifincorrect_accuracy||value.to_d!=value.to_i# if the user enters a value in exponent notation (eg '4e1') the to_i method does not convert this to the correct value
expect(sales_log.errors["savings"]).toinclude(matchI18n.t("validations.numeric.above_min",field:"Buyer’s total savings before any deposit paid",min:"£0"))
expect(sales_record.errors["savings"]).toinclude(matchI18n.t("validations.numeric.above_min",field:"Buyer’s total savings (to nearest £10) before any deposit paid",min:"£0"))
end
context"when validating percent"do
it"validates that suffixes are added in the error message"do
context"and this is an internal transfer from a non social housing"do
beforedo
lettings_log_xml.at_xpath("//xmlns:Q11").content="9 Residential care home"
@ -406,7 +434,7 @@ RSpec.describe Imports::LettingsLogsImportService do
end
it"intercepts the relevant validation error"do
expect(logger).toreceive(:warn).with(/Removing offered with error: Times previously offered since becoming available must be between 0 and 20/)
expect(logger).toreceive(:warn).with(/Removing offered with error: Enter a number between 0 and 20 for the amount of times the property has been re-let/)