diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-12-26 21:56:21 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-12-26 21:56:21 +0000 |
commit | f4f8923cf0ef5bd31f9e98cecf4603d0c4bde296 (patch) | |
tree | 2c5d9b59cefa59476ef48ea85aa0c2f00e1e33c1 /activerecord/test/cases/associations/cascaded_eager_loading_test.rb | |
parent | 6dc12881110d26bb952bd0f565623144f10a07b6 (diff) | |
parent | 5cebe69e74d411c3c9e5f6ab9d4b2b16ee36177c (diff) | |
download | rails-f4f8923cf0ef5bd31f9e98cecf4603d0c4bde296.tar.gz rails-f4f8923cf0ef5bd31f9e98cecf4603d0c4bde296.tar.bz2 rails-f4f8923cf0ef5bd31f9e98cecf4603d0c4bde296.zip |
Merge commit 'fred/pullable'
Diffstat (limited to 'activerecord/test/cases/associations/cascaded_eager_loading_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/cascaded_eager_loading_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb index 8c9ae8a031..45e74ea024 100644 --- a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb +++ b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb @@ -104,6 +104,14 @@ class CascadedEagerLoadingTest < ActiveRecord::TestCase authors.first.posts.first.special_comments.first.post.very_special_comment end end + + def test_eager_association_loading_where_first_level_returns_nil + authors = Author.find(:all, :include => {:post_about_thinking => :comments}, :order => 'authors.id DESC') + assert_equal [authors(:mary), authors(:david)], authors + assert_no_queries do + authors[1].post_about_thinking.comments.first + end + end end require 'models/vertex' |