diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-16 09:26:02 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-16 09:26:02 -0800 |
commit | 936404399d0bc4b7100b7837676c34f8130d565d (patch) | |
tree | 148fa360e845374b988f4419d6a8b55c225fb4bf /activerecord/test/cases/finder_test.rb | |
parent | 8d1a2b3ecde5a8745b3eaab4763a71d80ca3441f (diff) | |
parent | 63a22ca6169f06d10cd843ea3a75df6498fdcf7d (diff) | |
download | rails-936404399d0bc4b7100b7837676c34f8130d565d.tar.gz rails-936404399d0bc4b7100b7837676c34f8130d565d.tar.bz2 rails-936404399d0bc4b7100b7837676c34f8130d565d.zip |
Merge pull request #3634 from RyanNaughton/fixes_3483
Fixes 3483
Diffstat (limited to 'activerecord/test/cases/finder_test.rb')
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 4 |
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..05c4b15407 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,5,6,7,8,9], Comment.find(:all, :conditions => {:id => [1..2, 3, 5, 6..8, 9]}).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 }) } |