aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorGabriel Sobrinho <gabriel.sobrinho@gmail.com>2011-11-01 08:40:30 -0200
committerRyan Naughton <Ryan.J.Naughton@gmail.com>2011-11-14 21:39:03 -0600
commite1b79c56bef43d858fc59dbe7506039414c9e4ed (patch)
tree83790a3b2d35be901d2ff7666474db30585e86e6 /activerecord
parentc7ab43ff062390205f1508b6476cd354a16eb362 (diff)
downloadrails-e1b79c56bef43d858fc59dbe7506039414c9e4ed.tar.gz
rails-e1b79c56bef43d858fc59dbe7506039414c9e4ed.tar.bz2
rails-e1b79c56bef43d858fc59dbe7506039414c9e4ed.zip
Failing test case for issue #3483
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/finder_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index 69754d23b9..688679f081 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -374,6 +374,10 @@ class FinderTest < ActiveRecord::TestCase
assert_equal [1], Comment.find(:all, :conditions => { :id => 1..1, :post_id => 1..10 }).map(&:id).sort
end
+ def test_find_on_hash_conditions_with_array_of_integers_and_ranges
+ assert_equal [1,2,3], Comment.find(:all, :conditions => { :post_id => [1..2, 3, 4, 5..10]}).map(&:id).sort
+ end
+
def test_find_on_multiple_hash_conditions
assert Topic.find(1, :conditions => { :author_name => "David", :title => "The First Topic", :replies_count => 1, :approved => false })
assert_raise(ActiveRecord::RecordNotFound) { Topic.find(1, :conditions => { :author_name => "David", :title => "The First Topic", :replies_count => 1, :approved => true }) }