Browse Source

Update tasklist helper tests

pull/2445/head
Kat 2 years ago
parent
commit
c3822732f2
  1. 10
      spec/helpers/tasklist_helper_spec.rb

10
spec/helpers/tasklist_helper_spec.rb

@ -185,6 +185,11 @@ RSpec.describe TasklistHelper do
allow(lettings_log).to receive(:collection_period_open?).and_return(false)
end
before do
allow(sales_log.form).to receive(:submission_deadline).and_return(Time.utc(2023, 6, 9))
allow(sales_log).to receive(:collection_period_open?).and_return(false)
end
it "returns relevant text" do
expect(review_log_text(lettings_log)).to eq("This log is from the 2022/2023 collection window, which is now closed.")
end
@ -198,6 +203,11 @@ RSpec.describe TasklistHelper do
allow(lettings_log).to receive(:older_than_previous_collection_year?).and_return(true)
end
before do
allow(lettings_log.form).to receive(:submission_deadline).and_return(Time.utc(2022, 6, 9))
allow(lettings_log).to receive(:older_than_previous_collection_year?).and_return(true)
end
it "returns relevant text" do
expect(review_log_text(lettings_log)).to eq("This log is from the 2021/2022 collection window, which is now closed.")
end

Loading…
Cancel
Save