aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-03-28 16:13:57 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-03-28 16:13:57 +0000
commitbdd88810c1edf8289801f88170eb5c9659b2f774 (patch)
tree5db49fa022d20885310a4e86bcac0496f601396e /activerecord/test/cases/associations_test.rb
parent533da24bbce5c6eeb23ff372fa0b65911fc138d0 (diff)
downloadrails-bdd88810c1edf8289801f88170eb5c9659b2f774.tar.gz
rails-bdd88810c1edf8289801f88170eb5c9659b2f774.tar.bz2
rails-bdd88810c1edf8289801f88170eb5c9659b2f774.zip
Fixed that has_many :through would ignore the hash conditions (closes #11447) [miloops]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/cases/associations_test.rb')
-rwxr-xr-xactiverecord/test/cases/associations_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb
index 0a05bd0e56..3c14ee0881 100755
--- a/activerecord/test/cases/associations_test.rb
+++ b/activerecord/test/cases/associations_test.rb
@@ -1324,6 +1324,11 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
assert_equal 2, people(:michael).posts.find(:all, :include => :people).length
end
+ def test_has_many_through_respects_hash_conditions
+ assert_equal authors(:david).hello_posts, authors(:david).hello_posts_with_hash_conditions
+ assert_equal authors(:david).hello_post_comments, authors(:david).hello_post_comments_with_hash_conditions
+ end
+
end
class BelongsToAssociationsTest < ActiveRecord::TestCase