Sha256: c2decfd9de23d10815b7e6586902c5e63d0af858658525588d7c4ba3379e810f

Contents?: true

Size: 831 Bytes

Versions: 1

Compression:

Stored size: 831 Bytes

Contents

require 'spec_helper'

describe Popolo::OrganizationsController do
  describe 'routing' do
    before :each do
      @routes = Popolo::Engine.routes
    end

    it 'routes to #index' do
      get('/organizations').should route_to('popolo/organizations#index')
    end

    it 'routes to #show' do
      get('/organizations/1').should route_to('popolo/organizations#show', id: '1')
    end

    it 'routes to #show' do
      get('/organizations/foo').should route_to('popolo/organizations#show', id: 'foo')
    end

    it 'routes to #nested_index' do
      get('/organizations/foo/organizations').should route_to('popolo/organizations#nested_index', path: 'foo')
    end

    it 'routes to #nested_show' do
      get('/organizations/foo/bar').should route_to('popolo/organizations#nested_show', path: 'foo/bar')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
popolo-0.0.1 spec/routing/popolo/organizations_routing_spec.rb