diff --git a/app/helpers/tasklist_helper.rb b/app/helpers/tasklist_helper.rb index 55f44bee6..b93804cd2 100644 --- a/app/helpers/tasklist_helper.rb +++ b/app/helpers/tasklist_helper.rb @@ -81,9 +81,9 @@ module TasklistHelper deadline_for_log = log_quarter.cutoff_date if deadline_for_log.beginning_of_day >= Time.zone.today.beginning_of_day - "

#{log_quarter.quarter} Deadline: #{log_quarter.cutoff_date.strftime('%A %-d %B %Y')}.

".html_safe + "

#{log_quarter.quarter} Deadline: #{log_quarter.cutoff_date.strftime('%-d %B %Y')}.

".html_safe else - "

Overdue: #{log_quarter.quarter} deadline #{log_quarter.cutoff_date.strftime('%A %-d %B %Y')}.

".html_safe + "

Overdue: #{log_quarter.quarter} deadline #{log_quarter.cutoff_date.strftime('%-d %B %Y')}.

".html_safe end end diff --git a/spec/helpers/tasklist_helper_spec.rb b/spec/helpers/tasklist_helper_spec.rb index 476528299..26be7da40 100644 --- a/spec/helpers/tasklist_helper_spec.rb +++ b/spec/helpers/tasklist_helper_spec.rb @@ -227,7 +227,7 @@ RSpec.describe TasklistHelper do it "returns the deadline text" do allow(Time.zone).to receive(:today).and_return(Time.zone.local(2025, 5, 7)) - expect(deadline_text(log)).to include("Q1 Deadline: ") + expect(deadline_text(log)).to include("Q1 Deadline: 11 July 2025.") end end @@ -236,7 +236,7 @@ RSpec.describe TasklistHelper do it "returns the overdue text" do allow(Time.zone).to receive(:today).and_return(Time.zone.local(2025, 6, 6)) - expect(deadline_text(log)).to include("Q4 Deadline: ") + expect(deadline_text(log)).to include("Q4 Deadline: 6 June 2025.") end end @@ -245,7 +245,7 @@ RSpec.describe TasklistHelper do it "returns the overdue text" do allow(Time.zone).to receive(:today).and_return(Time.zone.local(2025, 6, 7)) - expect(deadline_text(log)).to include("Overdue: Q4 deadline") + expect(deadline_text(log)).to include("Overdue: Q4 deadline 6 June 2025.") end end end