Sha256: 2f55e42e0bed08031f39588da091566806d56dff242af21821d6e52ba8313823
Contents?: true
Size: 638 Bytes
Versions: 5
Compression:
Stored size: 638 Bytes
Contents
require 'test_helper' class EmptyTest < ActiveSupport::TestCase test 'total pages' do assert_equal 1, relation.total_pages end test 'current page' do assert_equal 1, relation.current_page end test 'first page' do assert_equal 1, relation.first_page end test 'previous page' do assert_nil relation.previous_page end test 'next page' do assert_nil relation.next_page end test 'last page' do assert_equal 1, relation.last_page end test 'out of bounds' do assert !relation.out_of_bounds? end protected def relation @relation ||= Record.page(1, length: 2) end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
pagers-3.1.5 | test/empty_test.rb |
pagers-3.1.4 | test/empty_test.rb |
pagers-3.1.3 | test/empty_test.rb |
pagers-3.1.2 | test/empty_test.rb |
pagers-3.1.1 | test/empty_test.rb |