Browse Source

Rubocop

pull/307/head
baarkerlounger 3 years ago
parent
commit
b8b14e0021
  1. 4
      spec/models/case_log_spec.rb
  2. 27
      spec/models/validations/property_validations_spec.rb

4
spec/models/case_log_spec.rb

@ -214,6 +214,10 @@ RSpec.describe CaseLog do
it "validates reason for vacancy" do it "validates reason for vacancy" do
expect(validator).to receive(:validate_rsnvac) expect(validator).to receive(:validate_rsnvac)
end end
it "validates accessibility requirements" do
expect(validator).to receive(:validate_accessibility_requirements)
end
end end
describe "status" do describe "status" do

27
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 context "when the property has been let before" do
let(:non_temporary_previous_tenancies) do let(:non_temporary_previous_tenancies) do
[ [
"Tied housing or rented with job", "Supported housing", "Sheltered accommodation", "Tied housing or rented with job",
"Home Office Asylum Support", "Any other accommodation" "Supported housing",
"Sheltered accommodation",
"Home Office Asylum Support",
"Any other accommodation",
] ]
end end
context "when the previous tenancy was not temporary" do 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 it "validates that the property is not being relet to tenant who occupied as temporary" do
non_temporary_previous_tenancies.each do |rsn| non_temporary_previous_tenancies.each do |rsn|
record.rsnvac = "Relet to tenant who occupied same property as temporary accommodation" record.rsnvac = "Relet to tenant who occupied same property as temporary accommodation"
@ -253,15 +267,6 @@ RSpec.describe Validations::PropertyValidations do
end end
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 it "validates that the letting source is not a referral" do
referral_sources.each do |src| referral_sources.each do |src|
record.rsnvac = "Relet to tenant who occupied same property as temporary accommodation" record.rsnvac = "Relet to tenant who occupied same property as temporary accommodation"

Loading…
Cancel
Save