From 30b985dfe57a41cad1743fff8869c36e1409350f Mon Sep 17 00:00:00 2001 From: Matthew Phelan Date: Wed, 20 Oct 2021 08:28:06 +0100 Subject: [PATCH] CLDC-487 - typo fixes --- app/models/case_log.rb | 4 ++-- spec/models/case_log_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/case_log.rb b/app/models/case_log.rb index 519485580..5a390976b 100644 --- a/app/models/case_log.rb +++ b/app/models/case_log.rb @@ -17,14 +17,14 @@ class CaseLogValidator < ActiveModel::Validator def validate_reasonable_preference(record) if record.homelessness == "No" && record.reasonable_preference == "Yes" - record.errors.add :reasonable_preference, "can not be Yes if Not Homesless imediately prior to this letting has been selected" + record.errors.add :reasonable_preference, "can not be Yes if Not Homeless immediately prior to this letting has been selected" elsif record.reasonable_preference == "Yes" if !record.reasonable_preference_reason_homeless && !record.reasonable_preference_reason_unsatisfactory_housing && !record.reasonable_preference_reason_medical_grounds && !record.reasonable_preference_reason_avoid_hardship && !record.reasonable_preference_reason_do_not_know record.errors.add :reasonable_preference_reason, "- if reasonable preference is Yes, a reason must be given" end elsif record.reasonable_preference == "No" if record.reasonable_preference_reason_homeless || record.reasonable_preference_reason_unsatisfactory_housing || record.reasonable_preference_reason_medical_grounds || record.reasonable_preference_reason_avoid_hardship || record.reasonable_preference_reason_do_not_know - record.errors.add :reasonable_preference_reason, "- if reasonable preference is no, no reasons should be given" + record.errors.add :reasonable_preference_reason, "- if reasonable preference is No, no reasons should be given" end end end diff --git a/spec/models/case_log_spec.rb b/spec/models/case_log_spec.rb index 236ddf7dc..b27b0594e 100644 --- a/spec/models/case_log_spec.rb +++ b/spec/models/case_log_spec.rb @@ -39,7 +39,7 @@ RSpec.describe Form, type: :model do }.to raise_error(ActiveRecord::RecordInvalid) end - it "if not previously homesless reasonable preference should not be selected" do + it "if not previously homeless reasonable preference should not be selected" do expect { CaseLog.create!( homelessness: "No",