From 8863e776b3208c3cd245e387a0ca2bb1ea48fa65 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Thu, 15 Feb 2024 14:28:29 +0000 Subject: [PATCH] feat: update spec --- spec/models/lettings_log_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/models/lettings_log_spec.rb b/spec/models/lettings_log_spec.rb index ee708be89..37158be86 100644 --- a/spec/models/lettings_log_spec.rb +++ b/spec/models/lettings_log_spec.rb @@ -2380,6 +2380,10 @@ RSpec.describe LettingsLog do let(:now) { Time.zone.local(2024, 1, 1) } let!(:lettings_log) { create(:lettings_log, :setup_completed, startdate: now, preg_occ: nil, declaration: 1, hhmemb: 3) } + it "does not infer pregnancy as default" do + expect(lettings_log.preg_occ).to be_nil + end + it "does not infer pregnancy for all male households" do lettings_log.update!(sex1: "M", sex2: "M", sex3: "M") expect(lettings_log.preg_occ).to be_nil @@ -2395,6 +2399,10 @@ RSpec.describe LettingsLog do let(:now) { Time.zone.local(2024, 5, 1) } let!(:lettings_log) { create(:lettings_log, :setup_completed, startdate: now, preg_occ: nil, declaration: 1, hhmemb: 3) } + it "does not infer pregnancy as default" do + expect(lettings_log.preg_occ).to be_nil + end + it "infers no pregnancy for all male households" do lettings_log.update!(sex1: "M", sex2: "M", sex3: "M") expect(lettings_log.preg_occ).to eq(2)