Skip to content

Commit e114b7b

Browse files
Fix remaining tests
These tests were trying to register vaccinations on children that were not attending the session. This has been fixed by adding a record of the child attending the respective sessions.
1 parent 2ca15bf commit e114b7b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

spec/features/edit_vaccination_record_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,14 @@ def and_an_hpv_programme_is_underway
270270
given_name: "John",
271271
family_name: "Smith",
272272
organisation: @organisation,
273-
programmes: [@programme]
273+
programmes: [@programme],
274274
)
275275

276276
@patient_session =
277277
create(:patient_session, patient: @patient, session: @session)
278+
279+
@registration_status =
280+
create(:patient_session_registration_status, patient_session: @patient_session, status: :completed)
278281
end
279282

280283
def and_an_administered_vaccination_record_exists

spec/features/td_ipv_already_had_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ def given_a_td_ipv_programme_with_a_session(clinic:)
9191

9292
def and_a_patient_is_in_the_session
9393
@patient = create(:patient, session: @session)
94+
95+
@patient_session = PatientSession.find_by(patient: @patient, session: @session)
96+
@registration_status =
97+
create(:patient_session_registration_status, patient_session: @patient_session, status: :attending)
9498
end
9599

96100
def and_the_patient_doesnt_need_triage

0 commit comments

Comments
 (0)