aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-28 10:02:03 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-28 10:02:03 -0700
commitbee447a5b9fe1d683c6cc69aefb7fc22c2a9d9af (patch)
tree4f6483392215f96c492a5b711c49e811c929a6e5 /activerecord/test/cases
parent71acc2737aa346ee57f9fc21252a508ae83367a4 (diff)
downloadrails-bee447a5b9fe1d683c6cc69aefb7fc22c2a9d9af.tar.gz
rails-bee447a5b9fe1d683c6cc69aefb7fc22c2a9d9af.tar.bz2
rails-bee447a5b9fe1d683c6cc69aefb7fc22c2a9d9af.zip
porting 515917f5d8678af6c57842ca5dfd7c18e67ff1fe to master
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/associations/eager_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb
index 40859d425f..4a2c8bab5b 100644
--- a/activerecord/test/cases/associations/eager_test.rb
+++ b/activerecord/test/cases/associations/eager_test.rb
@@ -357,6 +357,12 @@ class EagerAssociationTest < ActiveRecord::TestCase
end
end
+ def test_eager_with_has_many_through_association_with_order
+ author_comments = Author.find(authors(:david).id).comments_desc
+ eager_author_comments = Author.find(authors(:david).id, :include => :comments_desc).comments_desc
+ assert_equal eager_author_comments, author_comments
+ end
+
def test_eager_with_has_many_through_with_conditions_join_model_with_include
post_tags = Post.find(posts(:welcome).id).misc_tags
eager_post_tags = Post.find(1, :include => :misc_tags).misc_tags