diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-04 17:16:18 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-04 17:16:18 +0000 |
commit | ab416b4dde0a6216fdfec909abc553b8bec6bb73 (patch) | |
tree | 8acc86c27e7f0d1e05314a9969ac0ce67c2dd11b /activerecord | |
parent | e85369ed7aa809e66c5829dca5ffcfdff867fb98 (diff) | |
download | rails-ab416b4dde0a6216fdfec909abc553b8bec6bb73.tar.gz rails-ab416b4dde0a6216fdfec909abc553b8bec6bb73.tar.bz2 rails-ab416b4dde0a6216fdfec909abc553b8bec6bb73.zip |
Make postgres8 ar tests work #1601 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/associations_go_eager_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/associations_go_eager_test.rb b/activerecord/test/associations_go_eager_test.rb index 460365bbdc..29a0e8a443 100644 --- a/activerecord/test/associations_go_eager_test.rb +++ b/activerecord/test/associations_go_eager_test.rb @@ -11,8 +11,9 @@ class EagerAssociationTest < Test::Unit::TestCase def test_loading_with_one_association posts = Post.find(:all, :include => :comments) - assert_equal 2, posts.first.comments.size - assert posts.first.comments.include?(comments(:greetings)) + post = posts.find { |p| p.id == 1 } + assert_equal 2, post.comments.size + assert post.comments.include?(comments(:greetings)) post = Post.find(:first, :include => :comments, :conditions => "posts.title = 'Welcome to the weblog'") assert_equal 2, post.comments.size |