From 1338758b1cb4a360aeae9e36e0c1abc639ec9ad4 Mon Sep 17 00:00:00 2001 From: Sam Seed Date: Fri, 11 Nov 2022 19:01:29 +0000 Subject: [PATCH] test: update test text to match what's being tested --- spec/models/location_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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')}")