Browse Source

feat: update tests

CLDC-allow-23-24-form-new
natdeanlewissoftwire 2 years ago
parent
commit
7e5a65d79d
  1. 6
      spec/components/log_summary_component_spec.rb
  2. 7
      spec/features/form/tasklist_page_spec.rb

6
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))

7
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

Loading…
Cancel
Save