Sha256: cae53b189fa5cb0d4cb1d476491c92ad2e613ef69a203390945a1087af1c6064
Contents?: true
Size: 746 Bytes
Versions: 4
Compression:
Stored size: 746 Bytes
Contents
require "test_helper" module Godmin module ResourceService class PaginationTest < ActiveSupport::TestCase def setup @article_service = 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
4 entries across 4 versions & 1 rubygems