aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations_go_eager_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/associations_go_eager_test.rb')
-rw-r--r--activerecord/test/associations_go_eager_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/associations_go_eager_test.rb b/activerecord/test/associations_go_eager_test.rb
index 36f79265a5..498d557a02 100644
--- a/activerecord/test/associations_go_eager_test.rb
+++ b/activerecord/test/associations_go_eager_test.rb
@@ -29,6 +29,10 @@ class EagerAssociationTest < Test::Unit::TestCase
assert_equal 2, posts.first.comments.size
end
+ def test_loading_with_no_associations
+ assert_nil Post.find(@authorless.id, :include => :author).author
+ end
+
def test_eager_association_loading_with_belongs_to
comments = Comment.find(:all, :include => :post)
assert_equal @welcome.title, comments.first.post.title