Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix tests relying on implicit ordering

  • Loading branch information...
commit 698357b9e4b0d03ea8dc7deb636e9772c4b67635 1 parent 84c10b0
Jeremy Kemper jeremy authored
6 activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
View
@@ -647,8 +647,7 @@ def test_assign_ids
developer.save
developer.reload
assert_equal 2, developer.projects.length
- assert_equal projects(:active_record), developer.projects[0]
- assert_equal projects(:action_controller), developer.projects[1]
+ assert_equal [projects(:active_record), projects(:action_controller)].map(&:id).sort, developer.projects_ids
end
def test_assign_ids_ignoring_blanks
@@ -657,8 +656,7 @@ def test_assign_ids_ignoring_blanks
developer.save
developer.reload
assert_equal 2, developer.projects.length
- assert_equal projects(:active_record), developer.projects[0]
- assert_equal projects(:action_controller), developer.projects[1]
+ assert_equal [projects(:active_record), projects(:action_controller)].map(&:id).sort, developer.projects_ids
end
def test_select_limited_ids_list
Please sign in to comment.
Something went wrong with that request. Please try again.