From 7e5a65d79d7fa40fce744ed8d17978253416d0d3 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Fri, 24 Feb 2023 17:27:37 +0000 Subject: [PATCH] feat: update tests --- spec/components/log_summary_component_spec.rb | 6 ++++++ spec/features/form/tasklist_page_spec.rb | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/spec/components/log_summary_component_spec.rb b/spec/components/log_summary_component_spec.rb index f8edfb948..9a1ef2e14 100644 --- a/spec/components/log_summary_component_spec.rb +++ b/spec/components/log_summary_component_spec.rb @@ -8,6 +8,12 @@ RSpec.describe LogSummaryComponent, type: :component do let(:lettings_log) { FactoryBot.create(:lettings_log, needstype: 1, startdate: Time.utc(2022, 1, 1), tenancycode:, propcode:) } let(:sales_log) { FactoryBot.create(:sales_log) } + around do |example| + Timecop.freeze(Time.zone.local(2022, 2, 8)) do + example.run + end + end + context "when rendering lettings log for a support user" do it "show the log summary with organisational relationships" do result = render_inline(described_class.new(current_user: support_user, log: lettings_log)) diff --git a/spec/features/form/tasklist_page_spec.rb b/spec/features/form/tasklist_page_spec.rb index 09d332583..c8e1d3289 100644 --- a/spec/features/form/tasklist_page_spec.rb +++ b/spec/features/form/tasklist_page_spec.rb @@ -11,7 +11,7 @@ RSpec.describe "Task List" do owning_organisation: user.organisation, managing_organisation: user.organisation, created_by: user, - ) + ) end let(:completed_lettings_log) do FactoryBot.create( @@ -20,7 +20,7 @@ RSpec.describe "Task List" do owning_organisation: user.organisation, managing_organisation: user.organisation, created_by: user, - ) + ) end let(:empty_lettings_log) do FactoryBot.create( @@ -28,7 +28,7 @@ RSpec.describe "Task List" do owning_organisation: user.organisation, managing_organisation: user.organisation, created_by: user, - ) + ) end let(:setup_completed_log) do FactoryBot.create( @@ -36,7 +36,6 @@ RSpec.describe "Task List" do :about_completed, owning_organisation: user.organisation, managing_organisation: user.organisation, - startdate: Time.zone.local(2021, 5, 1), created_by: user, ) end