From f502822337c6c0a7230541b57b4a3002a1e96782 Mon Sep 17 00:00:00 2001 From: Nat Dean-Lewis Date: Mon, 21 Sep 2026 13:48:57 +0100 Subject: [PATCH] CLDC-4515: use location postcode in spec over nil postcode --- spec/features/form/check_answers_page_lettings_logs_spec.rb | 2 +- spec/models/lettings_log_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/features/form/check_answers_page_lettings_logs_spec.rb b/spec/features/form/check_answers_page_lettings_logs_spec.rb index 33b740163..3b6bc69a3 100644 --- a/spec/features/form/check_answers_page_lettings_logs_spec.rb +++ b/spec/features/form/check_answers_page_lettings_logs_spec.rb @@ -18,7 +18,7 @@ RSpec.describe "Lettings Log Check Answers Page" do needstype: 2, scheme:, location:, - postcode_full: nil, + postcode_full: location.postcode, ) end let(:empty_lettings_log) do diff --git a/spec/models/lettings_log_spec.rb b/spec/models/lettings_log_spec.rb index d124a06cf..166011ecb 100644 --- a/spec/models/lettings_log_spec.rb +++ b/spec/models/lettings_log_spec.rb @@ -1965,8 +1965,8 @@ RSpec.describe LettingsLog do context "when there is a duplicate supported housing log" do let(:scheme) { create(:scheme, owning_organisation: organisation) } let(:location) { create(:location, scheme:) } - let!(:supported_housing_log) { create(:lettings_log, :duplicate, needstype: 2, location:, scheme:, owning_organisation: organisation, postcode_full: nil) } - let!(:duplicate_supported_housing_log) { create(:lettings_log, :duplicate, needstype: 2, location:, scheme:, owning_organisation: organisation, postcode_full: nil) } + let!(:supported_housing_log) { create(:lettings_log, :duplicate, needstype: 2, location:, scheme:, owning_organisation: organisation, postcode_full: location.postcode) } + let!(:duplicate_supported_housing_log) { create(:lettings_log, :duplicate, needstype: 2, location:, scheme:, owning_organisation: organisation, postcode_full: location.postcode) } it "returns the log as a duplicate" do expect(duplicate_sets).to contain_exactly(