diff options
Diffstat (limited to 'activerecord/test/cases/associations/has_many_associations_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/has_many_associations_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 0d8f311117..6eb71cb1e0 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -1353,6 +1353,9 @@ class HasManyAssociationsTest < ActiveRecord::TestCase author = Author.new(:name => "David") assert !author.essays.loaded? + # cache metadata in advance to avoid extra sql statements executed while testing + Essay.first + assert_queries 1 do assert_equal 1, author.essays.size end |