1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

adding a test to ensure offsets with no limits will work [#5316 state:resolved]

This commit is contained in:
Aaron Patterson 2010-10-20 17:17:22 -07:00
parent 828bb94d5a
commit 410114e85a

View file

@ -1150,6 +1150,12 @@ class BasicsTest < ActiveRecord::TestCase
assert_equal 3, scoped_developers.size
end
def test_no_limit_offset
assert_nothing_raised do
Developer.find(:all, :offset => 2)
end
end
def test_scoped_find_limit_offset
scoped_developers = Developer.send(:with_scope, :find => { :limit => 3, :offset => 2 }) do
Developer.find(:all, :order => 'id')