diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-12-18 09:42:15 -0800 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-12-18 09:42:15 -0800 |
commit | de2306f10cc8c0f91bf9fe3ef5c7e3daee9035f6 (patch) | |
tree | 3ddfb5e64b6069720a4ce9d840ed5d5a7d029c7f /activerecord/test | |
parent | 81c67c1441c5aa86c92b5db87cbbc7ca1cbd8a44 (diff) | |
parent | 109db5a55035781166f295d38a2702ce3cc83858 (diff) | |
download | rails-de2306f10cc8c0f91bf9fe3ef5c7e3daee9035f6.tar.gz rails-de2306f10cc8c0f91bf9fe3ef5c7e3daee9035f6.tar.bz2 rails-de2306f10cc8c0f91bf9fe3ef5c7e3daee9035f6.zip |
Merge pull request #4014 from lest/bypass-preloading-for-ids-reader
bypass preloading for ids_reader
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/associations/has_many_through_associations_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index 7a6aba6a6b..c7bc275cf6 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -528,6 +528,12 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase assert_equal [posts(:welcome).id, posts(:authorless).id].sort, people(:michael).post_ids.sort end + def test_get_ids_for_has_many_through_with_conditions_should_not_preload + Tagging.create!(:taggable_type => 'Post', :taggable_id => posts(:welcome).id, :tag => tags(:misc)) + ActiveRecord::Associations::Preloader.expects(:new).never + posts(:welcome).misc_tag_ids + end + def test_get_ids_for_loaded_associations person = people(:michael) person.posts(true) |