diff --git a/spec/models/validations/sales/property_validations_spec.rb b/spec/models/validations/sales/property_validations_spec.rb index f852bee44..a44ec5479 100644 --- a/spec/models/validations/sales/property_validations_spec.rb +++ b/spec/models/validations/sales/property_validations_spec.rb @@ -66,9 +66,10 @@ RSpec.describe Validations::Sales::PropertyValidations do it "does add an error if it's a bedsit" do property_validator.validate_property_unit_type(record) - property_validator.validate_property_number_of_bedrooms(record) + expect(record.errors.added? :proptype, "Properties with 2 or more bedrooms cannot be bedsits").to be true - expect(record.errors).to be_present + property_validator.validate_property_number_of_bedrooms(record) + expect(record.errors.added? :beds, "Bedsits have at most one bedroom").to be true end end end