Skip to content

Commit b898191

Browse files
committed
Ensure PDS sweep picks up invalidated patients
Follow-up to #4738 / adaafc3
1 parent 5dc396c commit b898191

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

app/jobs/enqueue_update_patients_from_pds_job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class EnqueueUpdatePatientsFromPDSJob < ApplicationJob
66
queue_as :pds
77

88
def perform
9-
scope = Patient.with_nhs_number.not_invalidated.not_deceased
9+
scope = Patient.with_nhs_number.not_deceased
1010

1111
patients =
1212
scope

spec/jobs/enqueue_update_patients_from_pds_job_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
it "only queues jobs for the approriate patients" do
1818
expect { perform_now }.to have_enqueued_job(
1919
PatientUpdateFromPDSJob
20-
).exactly(3).times
20+
).exactly(4).times
2121
end
2222

23-
it "doesn't queue a job for the invalidated patient" do
24-
expect { perform_now }.not_to have_enqueued_job(
25-
PatientUpdateFromPDSJob
26-
).with(invalidated_patient)
23+
it "queues a job for the invalidated patient" do
24+
expect { perform_now }.to have_enqueued_job(PatientUpdateFromPDSJob).with(
25+
invalidated_patient
26+
)
2727
end
2828

2929
it "doesn't queue a job for the deceased patient" do

0 commit comments

Comments
 (0)