diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-12-24 00:24:49 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-12-24 11:08:16 +0000 |
commit | 35202aa6911679cccb8187d12996e3f30661385c (patch) | |
tree | 13664cc913a4412557e4d4a3036377acfb57e450 /activerecord/test/cases | |
parent | a1ee3ac654078ef57832b8e9833ac13afcb944fa (diff) | |
download | rails-35202aa6911679cccb8187d12996e3f30661385c.tar.gz rails-35202aa6911679cccb8187d12996e3f30661385c.tar.bz2 rails-35202aa6911679cccb8187d12996e3f30661385c.zip |
Make PredicateBuilder recognise AR::Model
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/inclusion_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 |