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:
parent
828bb94d5a
commit
410114e85a
1 changed files with 6 additions and 0 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue