diff options
author | Jon Leighton <j@jonathanleighton.com> | 2013-01-18 11:25:00 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2013-01-18 11:25:00 +0000 |
commit | 5f759ff063b8ed054cdde0ed4f3593ef89fe59b7 (patch) | |
tree | ab3bbb209cddd74a71966cd213e59571f585e9f2 /activerecord/test/cases/associations/has_many_associations_test.rb | |
parent | e8d80f73996bc19b2fab46c7519c384ce96f1928 (diff) | |
download | rails-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.rb | 5 |
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 |