From 67f494db7f86deee19f956e2a55c2a6460c9d777 Mon Sep 17 00:00:00 2001 From: Kat Date: Tue, 15 Mar 2022 10:22:07 +0000 Subject: [PATCH] fix test --- app/models/case_log.rb | 2 ++ spec/models/validations/financial_validations_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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"])