|
|
|
@ -36,18 +36,32 @@ RSpec.describe "Task List" do |
|
|
|
:about_completed, |
|
|
|
:about_completed, |
|
|
|
owning_organisation: user.organisation, |
|
|
|
owning_organisation: user.organisation, |
|
|
|
managing_organisation: user.organisation, |
|
|
|
managing_organisation: user.organisation, |
|
|
|
startdate: Time.zone.local(2021, 5, 1), |
|
|
|
|
|
|
|
created_by: user, |
|
|
|
created_by: user, |
|
|
|
) |
|
|
|
) |
|
|
|
end |
|
|
|
end |
|
|
|
let(:id) { lettings_log.id } |
|
|
|
let(:id) { lettings_log.id } |
|
|
|
let(:status) { lettings_log.status } |
|
|
|
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 |
|
|
|
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) |
|
|
|
allow(lettings_log.form).to receive(:end_date).and_return(Time.zone.today + 1.day) |
|
|
|
sign_in user |
|
|
|
sign_in user |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
after do |
|
|
|
|
|
|
|
Timecop.unfreeze |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "shows if the section has not been started" do |
|
|
|
it "shows if the section has not been started" do |
|
|
|
visit("/lettings-logs/#{empty_lettings_log.id}") |
|
|
|
visit("/lettings-logs/#{empty_lettings_log.id}") |
|
|
|
expect(page).to have_content("This log has not been started.") |
|
|
|
expect(page).to have_content("This log has not been started.") |
|
|
|
|