Sha256: 7c6d84e91886214ad36c0252eec298d89aea73733dd349db1e5f4414db10b663

Contents?: true

Size: 753 Bytes

Versions: 17

Compression:

Stored size: 753 Bytes

Contents

require "test_helper"

module Godmin
  module ResourceService
    class PaginationTest < ActiveSupport::TestCase
      def setup
        @article_service = Fakes::ArticleService.new

        resources_class = Class.new do
          def limit(_limit_param)
            self
          end

          def offset(_offset_param)
            self
          end
        end

        @resources = resources_class.new
      end

      def test_paginator_is_set_correctly
        @article_service.apply_pagination(1, @resources)

        assert_kind_of Paginator, @article_service.paginator
        assert_equal   1,         @article_service.paginator.current_page
        assert_equal   25,        @article_service.paginator.per_page
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
godmin-2.3.0 test/unit/resources/resource_service/pagination_test.rb
godmin-2.2.2 test/unit/resources/resource_service/pagination_test.rb
godmin-2.2.1 test/unit/resources/resource_service/pagination_test.rb
godmin-2.2.0 test/unit/resources/resource_service/pagination_test.rb
godmin-2.1.0 test/unit/resources/resource_service/pagination_test.rb
godmin-2.0.0 test/unit/resources/resource_service/pagination_test.rb
godmin-1.5.0 test/lib/godmin/resources/resource_service/pagination_test.rb
godmin-1.4.0 test/lib/godmin/resources/resource_service/pagination_test.rb
godmin-1.3.1 test/lib/godmin/resources/resource_service/pagination_test.rb
godmin-1.3.0 test/lib/godmin/resources/resource_service/pagination_test.rb
godmin-1.2.0 test/lib/godmin/resources/resource_service/pagination_test.rb
godmin-1.1.0 test/lib/godmin/resources/resource_service/pagination_test.rb
godmin-1.0.0 test/lib/godmin/resources/resource_service/pagination_test.rb
godmin-0.12.4 test/lib/godmin/resources/resource_service/pagination_test.rb
godmin-0.12.3 test/lib/godmin/resources/resource_service/pagination_test.rb
godmin-0.12.2 test/lib/godmin/resources/resource_service/pagination_test.rb
godmin-0.12.1 test/lib/godmin/resources/resource_service/pagination_test.rb