aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/associations_test.rb')
-rw-r--r--activerecord/test/cases/associations_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb
index c22efaa227..7efacb44f3 100644
--- a/activerecord/test/cases/associations_test.rb
+++ b/activerecord/test/cases/associations_test.rb
@@ -254,6 +254,8 @@ class AssociationProxyTest < ActiveRecord::TestCase
test "first! works on loaded associations" do
david = authors(:david)
assert_equal david.posts.first, david.posts.reload.first!
+ assert david.posts.loaded?
+ assert_no_queries { david.posts.first! }
end
def test_reset_unloads_target