diff options
author | Xavier Noria <fxn@hashref.com> | 2010-07-31 11:55:24 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-07-31 11:55:24 +0200 |
commit | 3d7099891f07395ed889e7da9e13b3ff9244d539 (patch) | |
tree | 6a988362ec4a6b58c90a12e6b715cd6926a111ce /activerecord/test/cases/relations_test.rb | |
parent | 0e20e3ebc20250174867f33e0ad3972f7e7c76d0 (diff) | |
parent | d3819daaac0d2f730f2b34af31700c914e697375 (diff) | |
download | rails-3d7099891f07395ed889e7da9e13b3ff9244d539.tar.gz rails-3d7099891f07395ed889e7da9e13b3ff9244d539.tar.bz2 rails-3d7099891f07395ed889e7da9e13b3ff9244d539.zip |
Merge remote branch 'rails/master'
Diffstat (limited to 'activerecord/test/cases/relations_test.rb')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index cb252d56fe..c9313fe7b6 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -22,6 +22,11 @@ class RelationTest < ActiveRecord::TestCase assert_equal 5, Post.where(:id => post_authors).size end + def test_multivalue_where + posts = Post.where('author_id = ? AND id = ?', 1, 1) + assert_equal 1, posts.to_a.size + end + def test_scoped topics = Topic.scoped assert_kind_of ActiveRecord::Relation, topics |