aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorrailsbob <anup.narkhede@gmail.com>2009-08-09 13:01:42 +0100
committerPratik Naik <pratiknaik@gmail.com>2009-08-09 17:02:19 +0100
commit076ca48bd649ddea4dd1a320879c03a9fe7a0a6d (patch)
treed26b44c85916f94c43849c430d13afcbaa1065e1 /activerecord/test
parent654568e71b1ee36a04acef74b1a8ce4737050882 (diff)
downloadrails-076ca48bd649ddea4dd1a320879c03a9fe7a0a6d.tar.gz
rails-076ca48bd649ddea4dd1a320879c03a9fe7a0a6d.tar.bz2
rails-076ca48bd649ddea4dd1a320879c03a9fe7a0a6d.zip
Ensure hm:t#find does not assign nil to :include [#1845 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/associations/has_many_through_associations_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb
index f6b4a42377..799ab52025 100644
--- a/activerecord/test/cases/associations/has_many_through_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb
@@ -299,4 +299,9 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase
def test_has_many_association_through_a_has_many_association_with_nonstandard_primary_keys
assert_equal 1, owners(:blackbeard).toys.count
end
+
+ def test_find_on_has_many_association_collection_with_include_and_conditions
+ post_with_no_comments = people(:michael).posts_with_no_comments.first
+ assert_equal post_with_no_comments, posts(:authorless)
+ end
end