diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index e78624a98d1ba1e6c48763b74bf096842e2afccf..3dd2cb028ada667d49587052cfa5fa68e3f05e44 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -116,6 +116,13 @@ def test_loading_from_an_association assert_equal 2, posts.first.comments.size end + def test_loading_from_an_association_that_has_a_hash_of_conditions + assert_nothing_raised do + Author.find(:all, :include => :hello_posts_with_hash_conditions) + end + assert !Author.find(authors(:david).id, :include => :hello_posts_with_hash_conditions).hello_posts.empty? + end + def test_loading_with_no_associations assert_nil Post.find(posts(:authorless).id, :include => :author).author end