1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

regression test for #4206

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4086 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Rick Olson 2006-03-28 04:12:46 +00:00
parent 4e3c101bcb
commit f630403021

View file

@ -42,6 +42,11 @@ class AssociationsJoinModelTest < Test::Unit::TestCase
end end
end end
def test_count_polymorphic_has_many
assert_equal 1, posts(:welcome).taggings.count
assert_equal 1, posts(:welcome).tags.count
end
def test_polymorphic_has_many_going_through_join_model_with_find def test_polymorphic_has_many_going_through_join_model_with_find
assert_equal tags(:general), tag = posts(:welcome).tags.find(:first) assert_equal tags(:general), tag = posts(:welcome).tags.find(:first)
assert_no_queries do assert_no_queries do