diff options
Diffstat (limited to 'activerecord/test/finder_test.rb')
-rw-r--r-- | activerecord/test/finder_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index 65e8dc9229..98537ecad7 100644 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -58,6 +58,11 @@ class FinderTest < Test::Unit::TestCase assert_equal(entrants(:third).name, entrants.first.name) end + def test_find_all_with_limit_and_offset_and_multiple_orderings + developers = Developer.find(:all, :order => "salary ASC, id DESC", :limit => 3, :offset => 1) + assert_equal ["David", "fixture_10", "fixture_9"], developers.collect {|d| d.name} + end + def test_find_with_limit_and_condition developers = Developer.find(:all, :order => "id DESC", :conditions => "salary = 100000", :limit => 3, :offset =>7) assert_equal(1, developers.size) |