Browse Source

test: update tests

pull/1178/head
natdeanlewissoftwire 3 years ago
parent
commit
bc923b0d12
  1. 6
      spec/models/validations/sales/household_validations_spec.rb

6
spec/models/validations/sales/household_validations_spec.rb

@ -73,7 +73,7 @@ RSpec.describe Validations::Sales::HouseholdValidations do
record.relat2 = "P" record.relat2 = "P"
household_validator.validate_household_number_of_other_members(record) household_validator.validate_household_number_of_other_members(record)
expect(record.errors["relat2"]) expect(record.errors["relat2"])
.to include(match I18n.t("validations.household.relat.partner_under_16", person_num: 2)) .to include(match I18n.t("validations.household.relat.partner_under_16"))
end end
it "validates that a person over 20 must not be a child of the buyer" do it "validates that a person over 20 must not be a child of the buyer" do
@ -81,7 +81,7 @@ RSpec.describe Validations::Sales::HouseholdValidations do
record.relat2 = "C" record.relat2 = "C"
household_validator.validate_household_number_of_other_members(record) household_validator.validate_household_number_of_other_members(record)
expect(record.errors["relat2"]) expect(record.errors["relat2"])
.to include(match I18n.t("validations.household.relat.child_over_20", person_num: 2)) .to include(match I18n.t("validations.household.relat.child_over_20"))
end end
it "validates that a person aged 16-19 who is a student must be a child of the buyer" do it "validates that a person aged 16-19 who is a student must be a child of the buyer" do
@ -90,7 +90,7 @@ RSpec.describe Validations::Sales::HouseholdValidations do
record.relat2 = "P" record.relat2 = "P"
household_validator.validate_household_number_of_other_members(record) household_validator.validate_household_number_of_other_members(record)
expect(record.errors["relat2"]) expect(record.errors["relat2"])
.to include(match I18n.t("validations.household.relat.student_16_19_sales", person_num: 2)) .to include(match I18n.t("validations.household.relat.student_16_19_sales"))
end end
end end
end end

Loading…
Cancel
Save