Skip to content

Commit a422ec3

Browse files
committed
Add specs to cover final status
Jira-Issue: MAV-3404 Jira-Issue: MAV-2848
1 parent 6c3b439 commit a422ec3

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

spec/features/mmr_already_had_spec.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@
6363
and_the_dose_number_is_first
6464
and_the_consent_requests_are_sent
6565
then_the_parent_doesnt_receive_a_consent_request
66+
67+
when_the_status_updater_runs
68+
and_i_navigate_to_the_patient_record
69+
then_i_see_that_the_vaccination_record_has_outcome_vaccinated
6670
end
6771

6872
scenario "record a patient as already had their 1st MMR dose and then edit dates" do
@@ -138,6 +142,10 @@
138142
and_the_dose_number_is_second
139143
and_the_consent_requests_are_sent
140144
then_the_parent_doesnt_receive_a_consent_request
145+
146+
when_the_status_updater_runs
147+
and_i_navigate_to_the_patient_record
148+
then_i_see_that_the_vaccination_record_has_outcome_vaccinated
141149
end
142150
end
143151

@@ -398,4 +406,20 @@ def and_i_see_the_updated_date_in_the_summary
398406
"Date#{@vaccination_date.strftime("%-d %B %Y")}"
399407
)
400408
end
409+
410+
def when_the_status_updater_runs
411+
PatientStatusUpdaterJob.perform_inline(@patient.id)
412+
end
413+
414+
def and_i_navigate_to_the_patient_record
415+
visit patient_path(@patient)
416+
end
417+
418+
def then_i_see_that_the_vaccination_record_has_outcome_vaccinated
419+
expect(page).to have_content("Vaccination date #{@vaccination_date.strftime("%-d %B %Y")}")
420+
expect(page).to have_content("Location Unknown")
421+
expect(page).to have_content("Programme MMR")
422+
expect(page).to have_content("Source Manual report")
423+
expect(page).to have_content("Outcome Vaccinated")
424+
end
401425
end

0 commit comments

Comments
 (0)