File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,13 +4,7 @@ class ProcessPatientChangesetJob < ApplicationJob
44 queue_as :imports
55
66 def perform ( patient_changeset_id )
7- patient_changeset =
8- if patient_changeset_id . is_a? ( PatientChangeset )
9- patient_changeset_id
10- else
11- PatientChangeset . find ( patient_changeset_id )
12- end
13-
7+ patient_changeset = PatientChangeset . find ( patient_changeset_id )
148 return if patient_changeset . processed?
159
1610 unique_nhs_number = get_unique_nhs_number ( patient_changeset )
Original file line number Diff line number Diff line change 221221 } . not_to have_enqueued_job ( CommitImportJob )
222222 end
223223 end
224-
225- context "when passed a PatientChangeset object" do
226- let ( :search_results ) do
227- [
228- {
229- "step" => "no_fuzzy_with_history" ,
230- "result" => "one_match" ,
231- "nhs_number" => "9449306168" ,
232- "created_at" => Time . current . iso8601 ( 3 )
233- }
234- ]
235- end
236-
237- it "processes the changeset correctly" do
238- described_class . perform_now ( patient_changeset )
239-
240- expect ( patient_changeset . reload ) . to be_processed
241- expect ( patient_changeset . child_attributes [ "nhs_number" ] ) . to eq (
242- "9449306168"
243- )
244- end
245- end
246224 end
247225end
You can’t perform that action at this time.
0 commit comments