diff options
author | Raimonds Simanovskis <raimonds.simanovskis@gmail.com> | 2010-12-23 23:11:32 +0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-23 23:19:59 +0800 |
commit | d9c8c47e3db89ca75de6ae9a8497659378ef0c1d (patch) | |
tree | 3d63ac653d21b72a87ea94d550ec63a1dd11da4d | |
parent | c7f81f14dfe02a2b3839b86d9fd47ce784aeeca6 (diff) | |
download | rails-d9c8c47e3db89ca75de6ae9a8497659378ef0c1d.tar.gz rails-d9c8c47e3db89ca75de6ae9a8497659378ef0c1d.tar.bz2 rails-d9c8c47e3db89ca75de6ae9a8497659378ef0c1d.zip |
Fix for default_scope tests to ensure comparing of equally sorted lists
This is additional fix for commit
ebc47465a5865ab91dc7d058d2d8a0cc961510d7 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).
-rw-r--r-- | activerecord/test/cases/associations/has_many_through_associations_test.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/associations/has_one_through_associations_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index cf0eedbd13..816b43ab9e 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -466,7 +466,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase 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 diff --git a/activerecord/test/cases/associations/has_one_through_associations_test.rb b/activerecord/test/cases/associations/has_one_through_associations_test.rb index 93a4f498d0..856214997c 100644 --- a/activerecord/test/cases/associations/has_one_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_one_through_associations_test.rb @@ -235,6 +235,6 @@ class HasOneThroughAssociationsTest < ActiveRecord::TestCase 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 |