Sha256: 17b9ff7304994f8c2abf4ceb5b48f0af6b9b6bed9144c8ed70cb995dc76c9f71

Contents?: true

Size: 696 Bytes

Versions: 62

Compression:

Stored size: 696 Bytes

Contents

require 'test_helper'

module Workarea
  module Storefront
    class PaginationHelperTest < ViewTest
      def request
        @request ||= ActionDispatch::TestRequest.new
      end

      def test_pagination_path_for
        request.path = '/foo'

        result = pagination_path_for(page: 1)
        assert_equal('/foo?page=1', result)

        request.query_parameters[:page] = 1
        result = pagination_path_for(page: 2)
        assert_equal('/foo?page=2', result)

        request.query_parameters[:asdf] = 'blah'
        request.query_parameters[:page] = 1
        result = pagination_path_for(page: 2)
        assert_equal('/foo?asdf=blah&page=2', result)
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-storefront-3.5.15 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.4.36 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.5.14 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.4.35 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.5.13 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.4.34 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.5.12 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.4.33 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.5.11 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.5.10 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.4.32 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.5.9 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.4.31 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.5.8 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.4.30 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.5.7 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.4.29 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.5.6 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.4.28 test/helpers/workarea/storefront/pagination_helper_test.rb
workarea-storefront-3.5.5 test/helpers/workarea/storefront/pagination_helper_test.rb