Skip to content

Commit

Permalink
Sorts result and test data to eliminate flake
Browse files Browse the repository at this point in the history
  • Loading branch information
awwaiid committed Jul 29, 2023
1 parent d1d77fe commit 017b6c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/services/donation_itemized_breakdown_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
subject { described_class.new(organization: organization, donation_ids: donation_ids).fetch }

it "return the list of items donated with distributed" do
expect(subject).to eq(expected_output)
sorted_subject = subject.sort_by { |item| item[:name] }
sorted_expected_output = expected_output.sort_by { |item| item[:name] }
expect(sorted_subject).to eq(sorted_expected_output)
end
end
end

0 comments on commit 017b6c2

Please sign in to comment.