diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-01-16 21:14:34 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-01-16 21:32:12 +0000 |
commit | a2dab46cae35a06fd5c5500037177492a047c252 (patch) | |
tree | af4be28070368eccdc1151df59384c9ca7aee1bf /activerecord/test/cases/associations/cascaded_eager_loading_test.rb | |
parent | 46ea4442f3abc33d15e03487bae1c80346eab49a (diff) | |
download | rails-a2dab46cae35a06fd5c5500037177492a047c252.tar.gz rails-a2dab46cae35a06fd5c5500037177492a047c252.tar.bz2 rails-a2dab46cae35a06fd5c5500037177492a047c252.zip |
Deprecate inferred JOINs with includes + SQL snippets.
See the CHANGELOG for details.
Fixes #950.
Diffstat (limited to 'activerecord/test/cases/associations/cascaded_eager_loading_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/cascaded_eager_loading_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb index ff376a68d8..6733f3e889 100644 --- a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb +++ b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb @@ -61,7 +61,7 @@ class CascadedEagerLoadingTest < ActiveRecord::TestCase end def test_cascaded_eager_association_loading_with_duplicated_includes - categories = Category.includes(:categorizations).includes(:categorizations => :author).where("categorizations.id is not null") + categories = Category.includes(:categorizations).includes(:categorizations => :author).where("categorizations.id is not null").references(:categorizations) assert_nothing_raised do assert_equal 3, categories.count assert_equal 3, categories.all.size @@ -69,7 +69,7 @@ class CascadedEagerLoadingTest < ActiveRecord::TestCase end def test_cascaded_eager_association_loading_with_twice_includes_edge_cases - categories = Category.includes(:categorizations => :author).includes(:categorizations => :post).where("posts.id is not null") + categories = Category.includes(:categorizations => :author).includes(:categorizations => :post).where("posts.id is not null").references(:posts) assert_nothing_raised do assert_equal 3, categories.count assert_equal 3, categories.all.size @@ -127,7 +127,7 @@ class CascadedEagerLoadingTest < ActiveRecord::TestCase silly.parent_id = 1 assert silly.save - topics = Topic.find(:all, :include => :replies, :order => 'topics.id, replies_topics.id') + topics = Topic.find(:all, :include => :replies, :order => ['topics.id', 'replies_topics.id']) assert_no_queries do assert_equal 2, topics[0].replies.size assert_equal 0, topics[1].replies.size |