Skip to content

Commit

Permalink
Fix sort order assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagemaru committed Jan 25, 2024
1 parent f99d8c8 commit 9329bb4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/models/order_contact_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ class OrderContactTest < ActiveSupport::TestCase
order = Fabricate(:order)
m = OrderContact.create!(order: order, contact: Fabricate(:contact, lastname: 'Miller', client: order.client))
a = OrderContact.create!(order: order, contact: Fabricate(:contact, lastname: 'Aber', client: order.client))
assert_equal [a, m], order.order_contacts.list

expected = [a, m].map(&:attributes)
received = order.order_contacts.list.map(&:attributes)

assert_equal expected, received
end

test 'crm ids are replaced' do
Expand Down

0 comments on commit 9329bb4

Please sign in to comment.