diff --git a/app/models/case_log.rb b/app/models/case_log.rb index f725126a1..2740c2e3c 100644 --- a/app/models/case_log.rb +++ b/app/models/case_log.rb @@ -266,6 +266,8 @@ class CaseLog < ApplicationRecord def benefits_unknown? hb == 3 + end + def this_landlord? landlord == 1 end diff --git a/spec/models/validations/financial_validations_spec.rb b/spec/models/validations/financial_validations_spec.rb index 10060464f..ac4ef992c 100644 --- a/spec/models/validations/financial_validations_spec.rb +++ b/spec/models/validations/financial_validations_spec.rb @@ -205,7 +205,7 @@ RSpec.describe Validations::FinancialValidations do it "does not allow the scharge to be outside of 0 and 55 range per week when period is weekly" do record.needstype = 1 record.landlord = 1 - record.period = 7 + record.period = 1 record.scharge = 56 financial_validator.validate_rent_amount(record) expect(record.errors["scharge"]) @@ -215,7 +215,7 @@ RSpec.describe Validations::FinancialValidations do it "does allow the scharge to be between of 0 and 55 per week when period is weekly" do record.needstype = 1 record.landlord = 1 - record.period = 7 + record.period = 1 record.scharge = 54 financial_validator.validate_rent_amount(record) expect(record.errors["scharge"])