Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for default_scope tests to ensure comparing of equally sorted lists

This is additional fix for commit
ebc4746 Respect the default_scope on a join model when reading a through association
which otherwise was failing on Oracle (as it returned fixture comments in different order).
  • Loading branch information...
commit d9c8c47e3db89ca75de6ae9a8497659378ef0c1d 1 parent c7f81f1
@rsim rsim authored tenderlove committed
View
2  activerecord/test/cases/associations/has_many_through_associations_test.rb
@@ -466,7 +466,7 @@ def test_size_of_through_association_should_increase_correctly_when_has_many_ass
end
def test_has_many_through_with_default_scope_on_join_model
- assert_equal posts(:welcome).comments, authors(:david).comments_on_first_posts
+ assert_equal posts(:welcome).comments.order('id').all, authors(:david).comments_on_first_posts
end
def test_create_has_many_through_with_default_scope_on_join_model
View
2  activerecord/test/cases/associations/has_one_through_associations_test.rb
@@ -235,6 +235,6 @@ def test_value_is_properly_quoted
end
def test_has_one_through_with_default_scope_on_join_model
- assert_equal posts(:welcome).comments.first, authors(:david).comment_on_first_posts
+ assert_equal posts(:welcome).comments.order('id').first, authors(:david).comment_on_first_posts
end
end

1 comment on commit d9c8c47

@jonleighton
Collaborator

Oops, my bad, thanks. The commit number referenced is incorrect though - it's eba7664

Please sign in to comment.
Something went wrong with that request. Please try again.