Browse Source

CLDC-4515: use location postcode in spec over nil postcode

pull/3383/head
Nat Dean-Lewis 3 weeks ago
parent
commit
f502822337
  1. 2
      spec/features/form/check_answers_page_lettings_logs_spec.rb
  2. 4
      spec/models/lettings_log_spec.rb

2
spec/features/form/check_answers_page_lettings_logs_spec.rb

@ -18,7 +18,7 @@ RSpec.describe "Lettings Log Check Answers Page" do
needstype: 2, needstype: 2,
scheme:, scheme:,
location:, location:,
postcode_full: nil, postcode_full: location.postcode,
) )
end end
let(:empty_lettings_log) do let(:empty_lettings_log) do

4
spec/models/lettings_log_spec.rb

@ -1965,8 +1965,8 @@ RSpec.describe LettingsLog do
context "when there is a duplicate supported housing log" do context "when there is a duplicate supported housing log" do
let(:scheme) { create(:scheme, owning_organisation: organisation) } let(:scheme) { create(:scheme, owning_organisation: organisation) }
let(:location) { create(:location, scheme:) } let(:location) { create(:location, scheme:) }
let!(: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: nil) } 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 it "returns the log as a duplicate" do
expect(duplicate_sets).to contain_exactly( expect(duplicate_sets).to contain_exactly(

Loading…
Cancel
Save