Skip to content

Commit 253ef9a

Browse files
authored
Merge pull request #3612 from nhsuk/fix-subsequent-dates-message
Fix message about subsequent session dates
2 parents 1b0fe5e + 6a87e30 commit 253ef9a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

app/lib/govuk_notify_personalisation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ def show_additional_instructions
216216
end
217217

218218
def subsequent_session_dates_offered_message
219-
dates = session.today_or_future_dates.drop(1)
219+
dates = session.future_dates.drop(1)
220220
return "" if dates.empty?
221221

222222
"If they’re not seen, they’ll be offered the vaccination on #{
223-
dates.map { _1.to_fs(:short_day_of_week) }.to_sentence
223+
dates.map { it.to_fs(:short_day_of_week) }.to_sentence
224224
}."
225225
end
226226

spec/lib/govuk_notify_personalisation_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@
135135

136136
it do
137137
expect(to_h).to match(
138-
hash_including(consent_deadline: "Thursday 1 January")
138+
hash_including(
139+
consent_deadline: "Thursday 1 January",
140+
next_session_date: "Friday 2 January",
141+
subsequent_session_dates_offered_message: ""
142+
)
139143
)
140144
end
141145
end

0 commit comments

Comments
 (0)