under_min:"The minimum initial equity stake for this type of shared ownership sale is %{min_equity}%"
over_max:"The maximum initial equity stake is %{max_equity}%"
mortgage:"Mortgage value cannot be £0 if a mortgage was used for the purchase of this property"
shared_ownership_deposit:"You told us that the %{mortgage_deposit_and_discount_error_fields} add up to %{mortgage_deposit_and_discount_total}"
shared_ownership_deposit:"The %{mortgage_deposit_and_discount_error_fields} added together is %{mortgage_deposit_and_discount_total}. The value times the equity percentage is %{value_times_equity}. These figures should be the same"
expect(record.errors["mortgage"]).toinclude("You told us that the mortgage, deposit, and discount add up to £2,000.00")
expect(record.errors["deposit"]).toinclude("You told us that the mortgage, deposit, and discount add up to £2,000.00")
expect(record.errors["cashdis"]).toinclude("You told us that the mortgage, deposit, and discount add up to £2,000.00")
expect(record.errors["value"]).toinclude("You told us that the mortgage, deposit, and discount add up to £2,000.00")
expect(record.errors["equity"]).toinclude("You told us that the mortgage, deposit, and discount add up to £2,000.00")
expect(record.errors["mortgage"]).toinclude("The mortgage, deposit, and cash discount added together is £2,000.00. The value times the equity percentage is £3,000.00. These figures should be the same")
expect(record.errors["deposit"]).toinclude("The mortgage, deposit, and cash discount added together is £2,000.00. The value times the equity percentage is £3,000.00. These figures should be the same")
expect(record.errors["cashdis"]).toinclude("The mortgage, deposit, and cash discount added together is £2,000.00. The value times the equity percentage is £3,000.00. These figures should be the same")
expect(record.errors["value"]).toinclude("The mortgage, deposit, and cash discount added together is £2,000.00. The value times the equity percentage is £3,000.00. These figures should be the same")
expect(record.errors["equity"]).toinclude("The mortgage, deposit, and cash discount added together is £2,000.00. The value times the equity percentage is £3,000.00. These figures should be the same")
end
it"does not add an error if no deposit is given"do
@ -487,11 +487,11 @@ RSpec.describe Validations::Sales::FinancialValidations do
expect(record.errors["mortgage"]).toinclude("You told us that the mortgage, deposit, and discount add up to £3,000.00")
expect(record.errors["deposit"]).toinclude("You told us that the mortgage, deposit, and discount add up to £3,000.00")
expect(record.errors["cashdis"]).toinclude("You told us that the mortgage, deposit, and discount add up to £3,000.00")
expect(record.errors["value"]).toinclude("You told us that the mortgage, deposit, and discount add up to £3,000.00")
expect(record.errors["equity"]).toinclude("You told us that the mortgage, deposit, and discount add up to £3,000.00")
expect(record.errors["mortgage"]).toinclude("The mortgage, deposit, and cash discount added together is £3,000.00. The value times the equity percentage is £4,323.00. These figures should be the same")
expect(record.errors["deposit"]).toinclude("The mortgage, deposit, and cash discount added together is £3,000.00. The value times the equity percentage is £4,323.00. These figures should be the same")
expect(record.errors["cashdis"]).toinclude("The mortgage, deposit, and cash discount added together is £3,000.00. The value times the equity percentage is £4,323.00. These figures should be the same")
expect(record.errors["value"]).toinclude("The mortgage, deposit, and cash discount added together is £3,000.00. The value times the equity percentage is £4,323.00. These figures should be the same")
expect(record.errors["equity"]).toinclude("The mortgage, deposit, and cash discount added together is £3,000.00. The value times the equity percentage is £4,323.00. These figures should be the same")