Skip to content

Commit a06dcd8

Browse files
committed
Add template IDs for Flu consent emails
This adds in the three types of consent emails needed for Flu (initial request, first reminder, and subsequent reminders). These templates already exist in Notify so we can start to use them when sending emails out for Flu. This will also partially resolve this Sentry issue (https://good-machine.sentry.io/issues/6670514347/) which is related to the service trying to send emails for Flu where the templates don't currently exist. Further work will be needed to add personalisation and optional content for these templates and they will come in follow up PRs. Jira-Issue: MAV-1277
1 parent 9513cfe commit a06dcd8

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

config/initializers/govuk_notify.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@
88
consent_confirmation_triage: "604ee667-c996-471e-b986-79ab98d0767c",
99
consent_school_initial_reminder_doubles:
1010
"8835575d-be69-442f-846e-14d41eb214c7",
11+
consent_school_initial_reminder_flu: "7f85a5b4-5240-4ae9-94f7-43913852943c",
1112
consent_school_initial_reminder_hpv: "ceefd526-d44c-4561-b0d2-c9ef4ccaba4f",
1213
consent_school_request_doubles: "e9aa7f0f-986f-49be-a1ee-6d1d1c13e9ec",
14+
consent_school_request_flu: "017853bc-2b35-4aff-99b1-193e514613a0",
1315
consent_school_request_hpv: "6aa04f0d-94c2-4a6b-af97-a7369a12f681",
1416
consent_school_subsequent_reminder_doubles:
1517
"55d35c86-7365-406b-909f-1b7b78529ea8",
18+
consent_school_subsequent_reminder_flu:
19+
"c942ce27-590e-4387-9aa8-5b9b4f2796d1",
1620
consent_school_subsequent_reminder_hpv:
1721
"6410145f-dac1-46ba-82f3-a49cad0f66a6",
1822
session_clinic_initial_invitation: "fc99ac81-9eeb-4df8-9aa0-04f0eb48e37f",

spec/models/consent_notification_spec.rb

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,22 @@
104104
end
105105
end
106106

107+
context "with the Flu programme" do
108+
let(:programmes) { [create(:programme, :flu)] }
109+
110+
it "enqueues an email per parent" do
111+
expect { create_and_send! }.to have_delivered_email(
112+
:consent_school_request_flu
113+
).with(
114+
parent: parents.first,
115+
patient:,
116+
programmes:,
117+
session:,
118+
sent_by: current_user
119+
)
120+
end
121+
end
122+
107123
it "enqueues a text per parent" do
108124
expect { create_and_send! }.to have_delivered_sms(
109125
:consent_school_request
@@ -259,6 +275,22 @@
259275
end
260276
end
261277

278+
context "with the Flu programme" do
279+
let(:programmes) { [create(:programme, :flu)] }
280+
281+
it "enqueues an email per parent" do
282+
expect { create_and_send! }.to have_delivered_email(
283+
:consent_school_initial_reminder_flu
284+
).with(
285+
parent: parents.first,
286+
patient:,
287+
programmes:,
288+
session:,
289+
sent_by: current_user
290+
)
291+
end
292+
end
293+
262294
it "enqueues a text per parent" do
263295
expect { create_and_send! }.to have_delivered_sms(
264296
:consent_school_reminder
@@ -347,6 +379,22 @@
347379
end
348380
end
349381

382+
context "with the Flu programme" do
383+
let(:programmes) { [create(:programme, :flu)] }
384+
385+
it "enqueues an email per parent" do
386+
expect { create_and_send! }.to have_delivered_email(
387+
:consent_school_subsequent_reminder_flu
388+
).with(
389+
parent: parents.first,
390+
patient:,
391+
programmes:,
392+
session:,
393+
sent_by: current_user
394+
)
395+
end
396+
end
397+
350398
it "enqueues a text per parent" do
351399
expect { create_and_send! }.to have_delivered_sms(
352400
:consent_school_reminder

0 commit comments

Comments
 (0)