Browse Source

feat: fix tasklist_page_spec.rb

pull/1378/head
natdeanlewissoftwire 3 years ago
parent
commit
cf6aa4beb5
  1. 16
      spec/features/form/tasklist_page_spec.rb

16
spec/features/form/tasklist_page_spec.rb

@ -36,18 +36,32 @@ 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
let(:id) { lettings_log.id }
let(:status) { lettings_log.status }
around do |example|
Timecop.freeze(Time.zone.local(2022, 1, 1)) do
Singleton.__init__(FormHandler)
example.run
end
Timecop.return
Singleton.__init__(FormHandler)
end
before do
Timecop.freeze(Time.zone.local(2021, 5, 1))
setup_completed_log.update!(startdate: Time.zone.local(2021, 5, 1))
allow(lettings_log.form).to receive(:end_date).and_return(Time.zone.today + 1.day)
sign_in user
end
after do
Timecop.unfreeze
end
it "shows if the section has not been started" do
visit("/lettings-logs/#{empty_lettings_log.id}")
expect(page).to have_content("This log has not been started.")

Loading…
Cancel
Save