From 7bb76d02266c88c7b1f0989ea343a0ef062d04ce Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Thu, 18 May 2023 11:03:26 +0100 Subject: [PATCH] Fix uprn tests wip (#1644) * Fix uprn tests * remove uprn known check --- spec/shared/shared_log_examples.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/shared/shared_log_examples.rb b/spec/shared/shared_log_examples.rb index ef6e8c939..f9cc59633 100644 --- a/spec/shared/shared_log_examples.rb +++ b/spec/shared/shared_log_examples.rb @@ -55,7 +55,9 @@ RSpec.shared_examples "shared log examples" do |log_type| log_type, uprn: "123456789", uprn_confirmed: 1, + uprn_known: 1, county: "county", + postcode_full: nil, ) end @@ -79,7 +81,6 @@ RSpec.shared_examples "shared log examples" do |log_type| .and change(log, :postcode_full).from(nil).to("POSTCODE") .and change(log, :uprn_confirmed).from(1).to(nil) .and change(log, :county).from("county").to(nil) - .and change(log, :uprn_known).from(nil).to(1) end end @@ -92,7 +93,7 @@ RSpec.shared_examples "shared log examples" do |log_type| end context "when service errors" do - let(:log) { create(log_type, uprn: "123456789", uprn_confirmed: 1) } + let(:log) { build(log_type, :in_progress, uprn_known: 1, uprn: "123456789", uprn_confirmed: 1) } let(:error_message) { "error" } it "adds error to log" do