aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-08-17 23:46:55 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-08-17 23:46:55 +0000
commit18057d2fb6017df988fadc6496f187c2e6208277 (patch)
treea98a31e6839a3383975aa0081e071a3e6343dd96 /activerecord/test/associations_test.rb
parent4584376a914f8a8cee059943d80ba73d2d4e2627 (diff)
downloadrails-18057d2fb6017df988fadc6496f187c2e6208277.tar.gz
rails-18057d2fb6017df988fadc6496f187c2e6208277.tar.bz2
rails-18057d2fb6017df988fadc6496f187c2e6208277.zip
Cache nil results for :included has_one associations also. Closes #5787.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4783 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/associations_test.rb')
-rwxr-xr-xactiverecord/test/associations_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb
index cb704ffd2e..6e93b7430c 100755
--- a/activerecord/test/associations_test.rb
+++ b/activerecord/test/associations_test.rb
@@ -99,6 +99,9 @@ class HasOneAssociationsTest < Test::Unit::TestCase
def test_has_one_cache_nils
assert_nil companies(:another_firm).account
assert_queries(0) { companies(:another_firm).account }
+
+ firms = Firm.find(:all, :include => :account)
+ assert_queries(0) { firms.each(&:account) }
end
def test_proxy_assignment