Sha256: ee9fb442dcc9c798c4eaa10b0cbbc0d39cc3a4377092f299b3d3193543545584

Contents?: true

Size: 578 Bytes

Versions: 1

Compression:

Stored size: 578 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper.rb'

describe 'RoutingFilter::Pagination' do
  include RoutingFilterHelpers

  before :each do
    setup_environment(:pagination)
  end

  describe 'url generation' do
    it 'appends the segments /pages/:page to the generated path' do
      section_path(1, :page => 2).should == '/sections/1/pages/2'
    end

    it 'appends the segments /pages/:page to the generated path excluding http get params' do
      section_path(1, :page => 2, :foo => 'bar').should == '/sections/1/pages/2?foo=bar'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
strikeroff-routing-filter-0.1.0 spec/pagination_extension_spec.rb