File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,15 +217,15 @@ def postprocess_rows!
217217
218218 PatientTeamUpdater . call ( patient_scope : patients )
219219 PatientStatusUpdater . call ( patient_scope : Patient . where ( id : patients . ids ) )
220+ end
221+
222+ def post_commit!
223+ vaccination_records . sync_all_to_nhs_immunisations_api
220224
221225 vaccination_records
222226 . includes ( :patient , :team , :subteam )
223227 . find_each do |vaccination_record |
224228 AlreadyHadNotificationSender . call ( vaccination_record :)
225229 end
226230 end
227-
228- def post_commit!
229- vaccination_records . sync_all_to_nhs_immunisations_api
230- end
231231end
Original file line number Diff line number Diff line change 539539 SyncVaccinationRecordToNHSJob
540540 ) . with ( vaccination_record . id ) . once . on ( "immunisations_api_sync" )
541541 end
542+
543+ it "calls the AlreadyHadNotificationSender for the vaccination record" do
544+ expect ( AlreadyHadNotificationSender ) . to receive ( :call ) . with (
545+ vaccination_record :
546+ )
547+
548+ immunisation_import . send :post_commit!
549+ end
542550 end
543551
544552 describe "#postprocess_rows!" do
576584 ) . by ( 1 )
577585 end
578586 end
579-
580- it "calls the AlreadyHadNotificationSender for the vaccination record" do
581- expect ( AlreadyHadNotificationSender ) . to receive ( :call ) . with (
582- vaccination_record :
583- )
584-
585- immunisation_import . send :postprocess_rows!
586- end
587587 end
588588end
You can’t perform that action at this time.
0 commit comments