aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/has_many_associations_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2013-01-18 11:25:00 +0000
committerJon Leighton <j@jonathanleighton.com>2013-01-18 11:25:00 +0000
commit5f759ff063b8ed054cdde0ed4f3593ef89fe59b7 (patch)
treeab3bbb209cddd74a71966cd213e59571f585e9f2 /activerecord/test/cases/associations/has_many_associations_test.rb
parente8d80f73996bc19b2fab46c7519c384ce96f1928 (diff)
downloadrails-5f759ff063b8ed054cdde0ed4f3593ef89fe59b7.tar.gz
rails-5f759ff063b8ed054cdde0ed4f3593ef89fe59b7.tar.bz2
rails-5f759ff063b8ed054cdde0ed4f3593ef89fe59b7.zip
CollectionProxy should be default scoped
Fixes #8795
Diffstat (limited to 'activerecord/test/cases/associations/has_many_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/has_many_associations_test.rb5
1 files changed, 5 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 28400970fb..2aa3ecb108 100644
--- a/activerecord/test/cases/associations/has_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_associations_test.rb
@@ -1712,4 +1712,9 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
assert_equal 0, post.comments.count
end
end
+
+ test "collection proxy respects default scope" do
+ author = authors(:mary)
+ assert !author.first_posts.exists?
+ end
end