require 'test_helper' class RelationEmptyTest < ActiveSupport::TestCase setup do @relation = Model.page(1).per(2) end test "should have 1 page" do assert_equal @relation.total_pages, 1 end test "current page should be 1" do assert_equal @relation.current_page, 1 end test "first page should be 1" do assert_equal @relation.first_page, 1 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 @relation.last_page, 1 end test "should not be out of bounds" do assert !@relation.out_of_bounds? end end