aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/join_model_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/associations/join_model_test.rb')
-rw-r--r--activerecord/test/cases/associations/join_model_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb
index e72c6d0e07..e128d6dda3 100644
--- a/activerecord/test/cases/associations/join_model_test.rb
+++ b/activerecord/test/cases/associations/join_model_test.rb
@@ -331,7 +331,7 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase
assert_no_queries do
assert_equal desired, tag_with_include.tagged_posts
end
- assert_equal 4, tag_with_include.taggings.length
+ assert_equal 5, tag_with_include.taggings.length
end
def test_has_many_through_has_many_find_all
@@ -589,6 +589,12 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase
assert taggables.include?(posts(:welcome))
end
+ def test_preload_nil_polymorphic_belongs_to
+ assert_nothing_raised do
+ taggings = Tagging.find(:all, :include => :taggable, :conditions => ['taggable_type IS NULL'])
+ end
+ end
+
def test_preload_polymorphic_has_many
posts = Post.find(:all, :order => 'posts.id')
posts_with_taggings = Post.find(:all, :include => :taggings, :order => 'posts.id')