From 35202aa6911679cccb8187d12996e3f30661385c Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Sat, 24 Dec 2011 00:24:49 +0000 Subject: Make PredicateBuilder recognise AR::Model --- activerecord/test/cases/inclusion_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/inclusion_test.rb b/activerecord/test/cases/inclusion_test.rb index cc037e925d..70f402024b 100644 --- a/activerecord/test/cases/inclusion_test.rb +++ b/activerecord/test/cases/inclusion_test.rb @@ -23,6 +23,12 @@ class BasicInclusionModelTest < ActiveRecord::TestCase t = Teapot.create!(:name => "Ronnie Kemper") assert Teapot.exists?(t) end + + def test_predicate_builder + t = Teapot.create!(:name => "Bob") + assert_equal "Bob", Teapot.where(:id => [t]).first.name + assert_equal "Bob", Teapot.where(:id => t).first.name + end end class InclusionUnitTest < ActiveRecord::TestCase -- cgit v1.2.3