under_min:"The minimum initial equity stake for this type of shared ownership sale is %{min_equity}%"
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}%"
over_max:"The maximum initial equity stake is %{max_equity}%"
over_stairowned_minus_stairbought:"The initial equity stake is %{equity}% and the percentage owned in total minus the percentage bought is %{staircase_difference}%. In a staircasing transaction, the equity stake purchased cannot be larger than the percentage the buyer owns minus the percentage bought."
mortgage:"Mortgage value cannot be £0 if a mortgage was used for the purchase of this property"
mortgage:"Mortgage value cannot be £0 if a mortgage was used for the purchase of this property"
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"
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["equity"]).toinclude("The initial equity stake is 2% and the percentage owned in total minus the percentage bought is 1%. In a staircasing transaction, the equity stake purchased cannot be larger than the percentage the buyer owns minus the percentage bought.")
expect(record.errors["stairowned"]).toinclude("The initial equity stake is 2% and the percentage owned in total minus the percentage bought is 1%. In a staircasing transaction, the equity stake purchased cannot be larger than the percentage the buyer owns minus the percentage bought.")
expect(record.errors["stairbought"]).toinclude("The initial equity stake is 2% and the percentage owned in total minus the percentage bought is 1%. In a staircasing transaction, the equity stake purchased cannot be larger than the percentage the buyer owns minus the percentage bought.")
end
it"does not add errors if equity is less than stairowned - stairbought"do