Skip to content

Commit b41824a

Browse files
authored
Merge pull request #6512 from NHSDigital/MAV-5749-extend-vaccination-administered-specs
2 parents 89bdb6b + abbe827 commit b41824a

6 files changed

Lines changed: 26 additions & 10 deletions

spec/features/flu_vaccination_administered_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,17 +346,19 @@ def then_an_email_is_sent_to_the_parent_confirming_the_vaccination
346346
vaccine =
347347
VaccinationRecord.includes(:vaccine).find_by!(patient: @patient).vaccine
348348

349-
side_effects =
349+
method_and_side_effects =
350350
case vaccine.brand
351351
when "Fluenz"
352352
[
353+
"Method: nasal spray",
353354
"a runny or blocked nose",
354355
"loss of appetite",
355356
"tiredness",
356357
"a headache"
357358
]
358359
when "Cell-based Trivalent Influenza Vaccine Seqirus"
359360
[
361+
"Method: injection",
360362
"an aching body",
361363
"a slightly raised temperature",
362364
"swelling or pain where the injection was given"
@@ -370,7 +372,7 @@ def then_an_email_is_sent_to_the_parent_confirming_the_vaccination
370372
to: @patient.consents.last.parent.email,
371373
subject: "Your child had their flu vaccination today",
372374
template: :vaccination_administered_flu
373-
).with_content_including("Vaccination: flu", *side_effects)
375+
).with_content_including("Vaccination: flu", *method_and_side_effects)
374376
)
375377
end
376378

spec/features/hpv_vaccination_administered_spec.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ def given_i_am_signed_in
132132
:patient,
133133
:consent_given_triage_not_needed,
134134
:in_attendance,
135+
given_name: "John",
136+
family_name: "Doe",
135137
programmes: [programme],
136138
session: @session
137139
)
@@ -305,8 +307,10 @@ def then_an_email_is_sent_to_the_parent_confirming_the_vaccination
305307
subject: "Your child had their HPV vaccination today",
306308
template: :vaccination_administered_hpv
307309
).with_content_including(
308-
"HPV vaccination",
309-
"Gardasil 9",
310+
"John Doe had their HPV vaccination at #{@session.location.name} today",
311+
"Vaccination: HPV",
312+
"Vaccine: Gardasil 9",
313+
"Date of vaccination: 01/02/2024",
310314
"swelling or pain where the injection was given",
311315
"a headache",
312316
"a high temperature",

spec/features/menacwy_vaccination_administered_spec.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ def given_i_am_signed_in
7878
:patient,
7979
:consent_given_triage_not_needed,
8080
:in_attendance,
81+
given_name: "John",
82+
family_name: "Doe",
8183
programmes: [programme],
8284
session: @session
8385
)
@@ -217,8 +219,10 @@ def then_an_email_is_sent_to_the_parent_confirming_the_vaccination
217219
subject: "Your child had their MenACWY vaccination today",
218220
template: :vaccination_administered_menacwy
219221
).with_content_including(
220-
"MenACWY vaccination",
221-
"MenQuadfi",
222+
"John Doe had their MenACWY vaccination at #{@session.location.name} today",
223+
"Vaccination: MenACWY",
224+
"Vaccine: MenQuadfi",
225+
"Date of vaccination: 01/02/2024",
222226
"swelling or pain where the injection was given",
223227
"feeling drowsy",
224228
"feeling sick",

spec/features/mmr_vaccination_administered_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ def then_an_email_is_sent_to_the_parent_confirming_the_vaccination
309309
).with_content_including(
310310
"MMR vaccination",
311311
"a raised, blotchy rash",
312-
"swollen glands around the cheeks, neck and jaw"
312+
"swollen glands around the cheeks, neck and jaw",
313+
"Your child still needs a second dose of the MMR vaccine"
313314
)
314315
)
315316
end

spec/features/mmrv_vaccination_administered_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ def then_an_email_is_sent_to_the_parent_confirming_the_vaccination
273273
"MMRV vaccination",
274274
"ProQuad",
275275
"a raised, blotchy rash",
276-
"swollen glands around the cheeks, neck and jaw"
276+
"swollen glands around the cheeks, neck and jaw",
277+
"Your child still needs a second dose of the MMR vaccine"
277278
)
278279
)
279280
end

spec/features/td_ipv_vaccination_administered_spec.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ def given_i_am_signed_in
7878
:patient,
7979
:consent_given_triage_not_needed,
8080
:in_attendance,
81+
given_name: "John",
82+
family_name: "Doe",
8183
programmes: [programme],
8284
session: @session
8385
)
@@ -218,8 +220,10 @@ def then_an_email_is_sent_to_the_parent_confirming_the_vaccination
218220
"Your child had their Td/IPV (3-in-1 teenage booster) vaccination today",
219221
template: :vaccination_administered_td_ipv
220222
).with_content_including(
221-
"3-in-1 teenage booster",
222-
"Revaxis",
223+
"John Doe had their Td/IPV (3-in-1 teenage booster) vaccination at #{@session.location.name} today",
224+
"Vaccination: Td/IPV",
225+
"Vaccine: Revaxis",
226+
"Date of vaccination: 01/02/2024",
223227
"dizziness",
224228
"feeling or being sick",
225229
"a headache",

0 commit comments

Comments
 (0)