aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-02-19 14:42:45 +0100
committerYves Senn <yves.senn@gmail.com>2013-02-19 14:42:45 +0100
commit9be7f63db9063b004bc0645df1d49e23ee3ccae9 (patch)
tree33326c5ebad5df43f69321a02569287b27143b81
parentb4e053e867232e28c7b99b0d935161d1e4559ced (diff)
downloadrails-9be7f63db9063b004bc0645df1d49e23ee3ccae9.tar.gz
rails-9be7f63db9063b004bc0645df1d49e23ee3ccae9.tar.bz2
rails-9be7f63db9063b004bc0645df1d49e23ee3ccae9.zip
keep the build :green_heart:, #first on 1.8.7 and pg is different
The build only failed for ruby-1.8.7 and pg. The problem was that the statement: ```ruby author = Author.includes(:comments_with_order_and_conditions, :posts).first ``` resulted in Author with ID 2 where on all other rubies / db-engines Author with ID 1 was retunred. Of course this breaks the assertions.
-rw-r--r--activerecord/test/cases/associations/eager_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb
index 5d07ffa241..c125b89aee 100644
--- a/activerecord/test/cases/associations/eager_test.rb
+++ b/activerecord/test/cases/associations/eager_test.rb
@@ -1114,7 +1114,7 @@ class EagerAssociationTest < ActiveRecord::TestCase
end
test "preloading does not cache has many association subset when preloaded with a through association" do
- author = Author.includes(:comments_with_order_and_conditions, :posts).first
+ author = Author.where(:id => 1).includes(:comments_with_order_and_conditions, :posts).first
assert_no_queries { assert_equal 2, author.comments_with_order_and_conditions.size }
assert_no_queries { assert_equal 5, author.posts.size, "should not cache a subset of the association" }
end