Skip to content

Commit

Permalink
spread the array to use a fuzzy match, or explicitly order the relati…
Browse files Browse the repository at this point in the history
…on before equality comparison
  • Loading branch information
hroulston committed Dec 14, 2023
1 parent bdc3f13 commit 29d8182
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/models/case_contact_report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,12 @@

before { create_list(:case_contact, 8) }

context "when providing casa case ids" do
fcontext "when providing casa case ids" do
it "returns all case contacts with the casa case ids" do
report = described_class.new({casa_case_ids: [casa_case.id]})
expect(report.case_contacts.length).to eq(case_contacts.length)
expect(report.case_contacts).to eq(case_contacts)
expect(report.case_contacts).to include(*case_contacts)
expect(report.case_contacts.order(:id)).to eq(case_contacts)
end
end

Expand Down

0 comments on commit 29d8182

Please sign in to comment.