From b8b14e00211d5d29981a1267b64e738e68eb0a18 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Wed, 16 Feb 2022 10:31:43 +0000 Subject: [PATCH] Rubocop --- spec/models/case_log_spec.rb | 4 +++ .../validations/property_validations_spec.rb | 27 +++++++++++-------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/spec/models/case_log_spec.rb b/spec/models/case_log_spec.rb index fff57abf5..cad629252 100644 --- a/spec/models/case_log_spec.rb +++ b/spec/models/case_log_spec.rb @@ -214,6 +214,10 @@ RSpec.describe CaseLog do it "validates reason for vacancy" do expect(validator).to receive(:validate_rsnvac) end + + it "validates accessibility requirements" do + expect(validator).to receive(:validate_accessibility_requirements) + end end describe "status" do diff --git a/spec/models/validations/property_validations_spec.rb b/spec/models/validations/property_validations_spec.rb index 7cbd6164c..a223bfec9 100644 --- a/spec/models/validations/property_validations_spec.rb +++ b/spec/models/validations/property_validations_spec.rb @@ -237,12 +237,26 @@ RSpec.describe Validations::PropertyValidations do context "when the property has been let before" do let(:non_temporary_previous_tenancies) do [ - "Tied housing or rented with job", "Supported housing", "Sheltered accommodation", - "Home Office Asylum Support", "Any other accommodation" + "Tied housing or rented with job", + "Supported housing", + "Sheltered accommodation", + "Home Office Asylum Support", + "Any other accommodation", ] end context "when the previous tenancy was not temporary" do + let(:referral_sources) do + [ + "Re-located through official housing mobility scheme", + "Other social landlord", + "Police, probation or prison", + "Youth offending team", + "Community mental health team", + "Health service", + ] + end + it "validates that the property is not being relet to tenant who occupied as temporary" do non_temporary_previous_tenancies.each do |rsn| record.rsnvac = "Relet to tenant who occupied same property as temporary accommodation" @@ -253,15 +267,6 @@ RSpec.describe Validations::PropertyValidations do end end - let(:referral_sources) do - [ - "Re-located through official housing mobility scheme", - "Other social landlord", "Police, probation or prison", - "Youth offending team", "Community mental health team", - "Health service" - ] - end - it "validates that the letting source is not a referral" do referral_sources.each do |src| record.rsnvac = "Relet to tenant who occupied same property as temporary accommodation"