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"
discounted_sale_value:"Mortgage, deposit, and grant total must equal %{value_with_discount}"
discounted_sale_value:"The mortgage, deposit, and grant when added together is %{mortgage_deposit_and_grant_total}, and the purchase purchase price times by the discount is %{value_with_discount}. These figures should be the same"
expect(record.errors["mortgageused"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["mortgage"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["value"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["deposit"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["ownershipsch"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["discount"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["grant"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["mortgageused"]).toinclude("The mortgage, deposit, and grant when added together is £18,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
expect(record.errors["mortgage"]).toinclude("The mortgage, deposit, and grant when added together is £18,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
expect(record.errors["value"]).toinclude("The mortgage, deposit, and grant when added together is £18,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
expect(record.errors["deposit"]).toinclude("The mortgage, deposit, and grant when added together is £18,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
expect(record.errors["ownershipsch"]).toinclude("The mortgage, deposit, and grant when added together is £18,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
expect(record.errors["discount"]).toinclude("The mortgage, deposit, and grant when added together is £18,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
expect(record.errors["grant"]).toinclude("The mortgage, deposit, and grant when added together is £18,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
end
it"returns false if mortgage, deposit and grant total equals market value"do
@ -422,13 +422,13 @@ RSpec.describe Validations::Sales::FinancialValidations do
it"returns true if mortgage and deposit total does not equal market value - discount"do
expect(record.errors["mortgageused"]).toinclude("Mortgage, deposit, and grant total must equal £27,000.00")
expect(record.errors["mortgage"]).toinclude("Mortgage, deposit, and grant total must equal £27,000.00")
expect(record.errors["value"]).toinclude("Mortgage, deposit, and grant total must equal £27,000.00")
expect(record.errors["deposit"]).toinclude("Mortgage, deposit, and grant total must equal £27,000.00")
expect(record.errors["ownershipsch"]).toinclude("Mortgage, deposit, and grant total must equal £27,000.00")
expect(record.errors["discount"]).toinclude("Mortgage, deposit, and grant total must equal £27,000.00")
expect(record.errors["grant"]).toinclude("Mortgage, deposit, and grant total must equal £27,000.00")
expect(record.errors["mortgageused"]).toinclude("The mortgage, deposit, and grant when added together is £15,000.00, and the purchase purchase price times by the discount is £27,000.00. These figures should be the same")
expect(record.errors["mortgage"]).toinclude("The mortgage, deposit, and grant when added together is £15,000.00, and the purchase purchase price times by the discount is £27,000.00. These figures should be the same")
expect(record.errors["value"]).toinclude("The mortgage, deposit, and grant when added together is £15,000.00, and the purchase purchase price times by the discount is £27,000.00. These figures should be the same")
expect(record.errors["deposit"]).toinclude("The mortgage, deposit, and grant when added together is £15,000.00, and the purchase purchase price times by the discount is £27,000.00. These figures should be the same")
expect(record.errors["ownershipsch"]).toinclude("The mortgage, deposit, and grant when added together is £15,000.00, and the purchase purchase price times by the discount is £27,000.00. These figures should be the same")
expect(record.errors["discount"]).toinclude("The mortgage, deposit, and grant when added together is £15,000.00, and the purchase purchase price times by the discount is £27,000.00. These figures should be the same")
expect(record.errors["grant"]).toinclude("The mortgage, deposit, and grant when added together is £15,000.00, and the purchase purchase price times by the discount is £27,000.00. These figures should be the same")
end
it"returns false if mortgage and deposit total equals market value - discount"do
@ -451,13 +451,13 @@ RSpec.describe Validations::Sales::FinancialValidations do
it"returns true if mortgage and deposit total does not equal market value"do
expect(record.errors["mortgageused"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["mortgage"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["value"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["deposit"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["ownershipsch"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["discount"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["grant"]).toinclude("Mortgage, deposit, and grant total must equal £30,000.00")
expect(record.errors["mortgageused"]).toinclude("The mortgage, deposit, and grant when added together is £12,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
expect(record.errors["mortgage"]).toinclude("The mortgage, deposit, and grant when added together is £12,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
expect(record.errors["value"]).toinclude("The mortgage, deposit, and grant when added together is £12,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
expect(record.errors["deposit"]).toinclude("The mortgage, deposit, and grant when added together is £12,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
expect(record.errors["ownershipsch"]).toinclude("The mortgage, deposit, and grant when added together is £12,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
expect(record.errors["discount"]).toinclude("The mortgage, deposit, and grant when added together is £12,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
expect(record.errors["grant"]).toinclude("The mortgage, deposit, and grant when added together is £12,000.00, and the purchase purchase price times by the discount is £30,000.00. These figures should be the same")
end
it"returns false if mortgage and deposit total equals market value"do
@ -497,13 +497,13 @@ RSpec.describe Validations::Sales::FinancialValidations do
it"returns true if mortgage, grant and deposit total does not equal market value - discount"do
expect(record.errors["mortgageused"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["mortgage"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["value"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["deposit"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["ownershipsch"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["discount"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["grant"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["mortgageused"]).toinclude("The mortgage, deposit, and grant when added together is £8,010.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
expect(record.errors["mortgage"]).toinclude("The mortgage, deposit, and grant when added together is £8,010.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
expect(record.errors["value"]).toinclude("The mortgage, deposit, and grant when added together is £8,010.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
expect(record.errors["deposit"]).toinclude("The mortgage, deposit, and grant when added together is £8,010.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
expect(record.errors["ownershipsch"]).toinclude("The mortgage, deposit, and grant when added together is £8,010.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
expect(record.errors["discount"]).toinclude("The mortgage, deposit, and grant when added together is £8,010.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
expect(record.errors["grant"]).toinclude("The mortgage, deposit, and grant when added together is £8,010.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
end
it"returns false if mortgage, grant and deposit total equals market value - discount"do
@ -525,13 +525,13 @@ RSpec.describe Validations::Sales::FinancialValidations do
it"returns true if grant and deposit total does not equal market value - discount"do
expect(record.errors["mortgageused"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["mortgage"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["value"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["deposit"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["ownershipsch"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["discount"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["grant"]).toinclude("Mortgage, deposit, and grant total must equal £18,000.00")
expect(record.errors["mortgageused"]).toinclude("The mortgage, deposit, and grant when added together is £8,000.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
expect(record.errors["mortgage"]).toinclude("The mortgage, deposit, and grant when added together is £8,000.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
expect(record.errors["value"]).toinclude("The mortgage, deposit, and grant when added together is £8,000.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
expect(record.errors["deposit"]).toinclude("The mortgage, deposit, and grant when added together is £8,000.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
expect(record.errors["ownershipsch"]).toinclude("The mortgage, deposit, and grant when added together is £8,000.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
expect(record.errors["discount"]).toinclude("The mortgage, deposit, and grant when added together is £8,000.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
expect(record.errors["grant"]).toinclude("The mortgage, deposit, and grant when added together is £8,000.00, and the purchase purchase price times by the discount is £18,000.00. These figures should be the same")
end
it"returns false if mortgage, grant and deposit total equals market value - discount"do