From 8c847d91a5de8488f301f9c7cadb9df430b231c5 Mon Sep 17 00:00:00 2001 From: Irina Dumitrascu Date: Sun, 27 Sep 2009 13:22:40 +0300 Subject: [PATCH] Failing test for #2493 --- activerecord/test/cases/associations/eager_test.rb | 6 ++++++ 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 811ebfb..9d9b68c 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -217,6 +217,12 @@ class EagerAssociationTest < ActiveRecord::TestCase assert_equal [6,7,8], comments.collect { |c| c.id } end + def test_eager_association_loading_with_belongs_to_and_limit_non_selected_order_by + posts = Post.find(:all, :include => :comments, :limit => 5, :order => 'comments.post_id') + assert_equal 5, posts.length + assert_equal [1,2,4,5,7], posts.collect { |p| p.id } + end + def test_eager_association_loading_with_belongs_to_and_conditions_string_with_unquoted_table_name assert_nothing_raised do Comment.find(:all, :include => :post, :conditions => ['posts.id = ?',4]) -- 1.6.3.3