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:
parent
4e3c101bcb
commit
f630403021
1 changed files with 5 additions and 0 deletions
|
@ -42,6 +42,11 @@ class AssociationsJoinModelTest < Test::Unit::TestCase
|
|||
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
|
||||
assert_equal tags(:general), tag = posts(:welcome).tags.find(:first)
|
||||
assert_no_queries do
|
||||
|
|
Loading…
Reference in a new issue