From 19d5e0f0be5473a7accafb1194e1900895311748 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Fri, 29 Jul 2022 08:53:32 +0100 Subject: [PATCH] Ensure values in spec --- spec/components/log_summary_component_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/components/log_summary_component_spec.rb b/spec/components/log_summary_component_spec.rb index c7f452d68..61bfc5280 100644 --- a/spec/components/log_summary_component_spec.rb +++ b/spec/components/log_summary_component_spec.rb @@ -3,7 +3,9 @@ require "rails_helper" RSpec.describe LogSummaryComponent, type: :component do let(:support_user) { FactoryBot.create(:user, :support) } let(:coordinator_user) { FactoryBot.create(:user) } - let!(:log) { FactoryBot.create(:case_log, needstype: 1, startdate: Time.utc(2022, 1, 1)) } + let(:propcode) { "P3647" } + let(:tenancycode) { "T62863" } + let(:log) { FactoryBot.create(:case_log, needstype: 1, startdate: Time.utc(2022, 1, 1), tenancycode:, propcode:) } context "when rendering log for a support user" do it "show the log summary with organisational relationships" do @@ -12,7 +14,6 @@ RSpec.describe LogSummaryComponent, type: :component do expect(result).to have_link(log.id.to_s) expect(result).to have_text(log.tenancycode) expect(result).to have_text(log.propcode) - expect(result).to have_text(log.propcode) expect(result).to have_text("General needs") expect(result).to have_text("Tenancy starts 1 January 2022") expect(result).to have_text("Created 8 February 2022")