From 2f6d9329bd703c8810b4fdc0d25fa2e67fe60a8f Mon Sep 17 00:00:00 2001 From: samyou-softwire Date: Mon, 23 Mar 2026 15:42:43 +0000 Subject: [PATCH] fixup! CLDC-4325: Fix sales log spec in 2025 --- spec/models/sales_log_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/models/sales_log_spec.rb b/spec/models/sales_log_spec.rb index f65860d06..e18f6c0e5 100644 --- a/spec/models/sales_log_spec.rb +++ b/spec/models/sales_log_spec.rb @@ -725,13 +725,13 @@ RSpec.describe SalesLog, type: :model do let(:saledate) { collection_start_date_for_year(2025) } let(:hholdcount) { 4 } - it "correctly derives and saves hhmemb" do + it "correctly derives and saves hhmemb if it's a joint purchase" do record_from_db = described_class.find(sales_log.id) expect(record_from_db["hhmemb"]).to eq(6) end - it "correctly derives and saves hhmemb if it's a joint purchase" do - sales_log.update!(jointpur: 2, jointmore: 2) + it "correctly derives and saves hhmemb if it's not a joint purchase" do + sales_log.update!(jointpur: 2) record_from_db = described_class.find(sales_log.id) expect(record_from_db["hhmemb"]).to eq(5) end @@ -756,13 +756,13 @@ RSpec.describe SalesLog, type: :model do let(:saledate) { collection_start_date_for_year_or_later(2026) } let(:hholdcount) { 6 } - it "correctly derives and saves hhmemb" do + it "correctly derives and saves hhmemb if it's a joint purchase" do record_from_db = described_class.find(sales_log.id) expect(record_from_db["hhmemb"]).to eq(6) end - it "correctly derives and saves hhmemb if it's a joint purchase" do - sales_log.update!(jointpur: 2, jointmore: 2) + it "correctly derives and saves hhmemb if it's not a joint purchase" do + sales_log.update!(jointpur: 2) record_from_db = described_class.find(sales_log.id) expect(record_from_db["hhmemb"]).to eq(6) end