diff options
Diffstat (limited to 'activerecord/test/cases/associations_test.rb')
-rwxr-xr-x | activerecord/test/cases/associations_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb index 48c618b2c1..602fc18ab7 100755 --- a/activerecord/test/cases/associations_test.rb +++ b/activerecord/test/cases/associations_test.rb @@ -551,7 +551,8 @@ end class HasManyAssociationsTest < ActiveRecord::TestCase fixtures :accounts, :companies, :developers, :projects, - :developers_projects, :topics, :authors, :comments, :author_addresses + :developers_projects, :topics, :authors, :comments, :author_addresses, + :people, :posts def setup Client.destroyed_client_ids.clear @@ -1318,6 +1319,10 @@ class HasManyAssociationsTest < ActiveRecord::TestCase assert_equal 4, authors(:david).limited_comments.find(:all, :conditions => "comments.type = 'SpecialComment'", :limit => 9_000).length assert_equal 4, authors(:david).limited_comments.find_all_by_type('SpecialComment', :limit => 9_000).length end + + def test_find_all_include_over_the_same_table_for_through + assert_equal 2, people(:michael).posts.find(:all, :include => :people).length + end end |