aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/associations_test.rb')
-rwxr-xr-xactiverecord/test/associations_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb
index 68245379ed..e1a05e481b 100755
--- a/activerecord/test/associations_test.rb
+++ b/activerecord/test/associations_test.rb
@@ -539,6 +539,10 @@ class HasManyAssociationsTest < Test::Unit::TestCase
posts = Post.find(:all, :include => :comments)
assert_equal 2, posts.first.comments.size
assert_equal @greetings.body, posts.first.comments.first.body
+
+ post = Post.find(:first, :include => :comments, :conditions => "posts.title = 'Welcome to the weblog'")
+ assert_equal 2, post.comments.size
+ assert_equal @greetings.body, post.comments.first.body
end
def test_eager_association_loading_with_multiple_associations