Sha256: 6319e18de351509d30e204fccbdbb62be46e026fb5366782063d9fc121169e29
Contents?: true
Size: 732 Bytes
Versions: 4
Compression:
Stored size: 732 Bytes
Contents
require 'test_helper' class RelationEmptyTest < ActiveSupport::TestCase test "should have 1 page" do assert_equal 1, relation.total_pages end test "current page should be 1" do assert_equal 1, relation.current_page end test "first page should be 1" do assert_equal 1, relation.first_page end test "should have no previous page" do assert_nil relation.previous_page end test "should have no next page" do assert_nil relation.next_page end test "last page should be 1" do assert_equal 1, relation.last_page end test "should not be out of bounds" do assert !relation.out_of_bounds? end protected def relation @relation ||= Model.page(1, length: 2) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
pagers-3.0.3 | test/empty_test.rb |
pagers-3.0.2 | test/empty_test.rb |
pagers-3.0.1 | test/empty_test.rb |
pagers-3.0.0 | test/empty_test.rb |