diff --git a/spec/models/location_spec.rb b/spec/models/location_spec.rb index 58bd3872e..3fdd22148 100644 --- a/spec/models/location_spec.rb +++ b/spec/models/location_spec.rb @@ -39,7 +39,7 @@ RSpec.describe Location, type: :model do describe "#units" do let(:location) { FactoryBot.build(:location) } - it "does add an error when the postcode is invalid" do + it "does add an error when the number of units is invalid" do location.units = nil expect { location.save! } .to raise_error(ActiveRecord::RecordInvalid, "Validation failed: Units #{I18n.t('activerecord.errors.models.location.attributes.units.blank')}") @@ -49,7 +49,7 @@ RSpec.describe Location, type: :model do describe "#type_of_unit" do let(:location) { FactoryBot.build(:location) } - it "does add an error when the postcode is invalid" do + it "does add an error when the type of unit is invalid" do location.type_of_unit = nil expect { location.save! } .to raise_error(ActiveRecord::RecordInvalid, "Validation failed: Type of unit #{I18n.t('activerecord.errors.models.location.attributes.type_of_unit.blank')}")