Sha256: bc60b7b251a3c53a837ee14af4279f8a761a18c6680bee3e6553b88dd324bb79
Contents?: true
Size: 786 Bytes
Versions: 1
Compression:
Stored size: 786 Bytes
Contents
require 'test_helper' require 'active_support/core_ext/array/access' require 'geared_pagination/portion' class GearedPagination::PortionTest < ActiveSupport::TestCase test "offset" do assert_equal 0, GearedPagination::Portion.new(page_number: 1).offset assert_equal GearedPagination::Ratios::DEFAULTS.first, GearedPagination::Portion.new(page_number: 2).offset assert_equal GearedPagination::Ratios::DEFAULTS.first + GearedPagination::Ratios::DEFAULTS.second, GearedPagination::Portion.new(page_number: 3).offset end test "limit" do assert_equal GearedPagination::Ratios::DEFAULTS.first, GearedPagination::Portion.new(page_number: 1).limit assert_equal GearedPagination::Ratios::DEFAULTS.second, GearedPagination::Portion.new(page_number: 2).limit end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
geared_pagination-0.1 | test/portion_test.rb |