Browse Source

amend minor typo, add back a soft validation that had mysteriously gone missing

pull/1253/head
Arthur Campbell 3 years ago
parent
commit
b37ea4d253
  1. 2
      app/models/form/sales/pages/shared_ownership_deposit_value_check.rb
  2. 3
      config/locales/en.yml
  3. 2
      spec/models/form/sales/pages/shared_ownership_deposit_value_check_spec.rb
  4. 2
      spec/models/validations/shared_validations_spec.rb

2
app/models/form/sales/pages/shared_ownership_deposit_value_check.rb

@ -8,7 +8,7 @@ class Form::Sales::Pages::SharedOwnershipDepositValueCheck < ::Form::Page
]
@informative_text = {}
@title_text = {
"translation" => "soft_validations.shared_owhership_deposit.title_text",
"translation" => "soft_validations.shared_ownership_deposit.title_text",
"arguments" => [
{
"key" => "expected_shared_ownership_deposit_value",

3
config/locales/en.yml

@ -468,9 +468,10 @@ en:
title_text: "You told us the time between the start of the tenancy and the major repairs completion date is more than 2 years"
void_date:
title_text: "You told us the time between the start of the tenancy and the void date is more than 2 years"
shared_owhership_deposit:
shared_ownership_deposit:
title_text: "Mortgage, deposit and cash discount total should equal £%{expected_shared_ownership_deposit_value}"
old_persons_shared_ownership: "At least one buyer should be aged over 64 for Older persons’ shared ownership scheme"
staircase_bought_seems_high: "You said %{percentage}% was bought in this staircasing transaction, which seems high. Are you sure?"
devise:
two_factor_authentication:

2
spec/models/form/sales/pages/shared_ownership_deposit_value_check_spec.rb

@ -33,7 +33,7 @@ RSpec.describe Form::Sales::Pages::SharedOwnershipDepositValueCheck, type: :mode
it "has the correct title_text" do
expect(page.title_text).to eq({
"translation" => "soft_validations.shared_owhership_deposit.title_text",
"translation" => "soft_validations.shared_ownership_deposit.title_text",
"arguments" => [
{
"key" => "expected_shared_ownership_deposit_value",

2
spec/models/validations/shared_validations_spec.rb

@ -86,7 +86,7 @@ RSpec.describe Validations::SharedValidations do
context "when validating price" do
it "validates that £ prefix and , is added in the error message" do
sales_record.income1 = "random"
sales_record.income1 = -5
shared_validator.validate_numeric_min_max(sales_record)
expect(sales_record.errors["income1"])
.to include(match I18n.t("validations.numeric.within_range", field: "Buyer 1’s gross annual income", min: "£0", max: "£999,999"))

Loading…
Cancel
Save