Browse Source

tests: refactor

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

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

@ -72,7 +72,7 @@ RSpec.describe Validations::Sales::HouseholdValidations do
expect(record.errors["age2"]).to be_empty
end
it "validates that a person under 16 must not be a partner of the buyer"
it "validates that a person under 16 must not be a partner of the buyer" do
record.age2 = 14
record.relat2 = "P"
household_validator.validate_household_number_of_other_members(record)
@ -81,6 +81,7 @@ RSpec.describe Validations::Sales::HouseholdValidations do
expect(record.errors["age2"])
.to include(match I18n.t("validations.household.age.partner_under_16"))
end
end
it "validates that a person over 20 must not be a child of the buyer" do
record.age2 = 21

Loading…
Cancel
Save