mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
parent
d8ffaa413c
commit
d8a1df8aa4
1 changed files with 12 additions and 0 deletions
|
@ -70,6 +70,18 @@ if defined? ActiveRecord
|
|||
assert @users.out_of_range?
|
||||
end
|
||||
|
||||
test 'it works when chained after `where`' do
|
||||
@scope = User.where.not(id: nil).page(1).without_count
|
||||
@scope.each
|
||||
|
||||
assert_no_queries do
|
||||
assert_not @scope.last_page?
|
||||
end
|
||||
assert_no_queries do
|
||||
assert_not @scope.out_of_range?
|
||||
end
|
||||
end
|
||||
|
||||
test 'regression: call arel first' do
|
||||
@users = User.page(1).without_count
|
||||
@users.arel
|
||||
|
|
Loading…
Reference in a new issue