Sha256: 1faf4b8015bc20743990d5293bcd6be0dd8cad17d2570e20cd5ba7d820846e03

Contents?: true

Size: 1.88 KB

Versions: 27

Compression:

Stored size: 1.88 KB

Contents

require 'spec_helper'

module Spotlight
  describe 'FeaturePagesController and AboutPagesController', type: :routing do
    describe 'routing' do
      routes { Spotlight::Engine.routes }

      it 'routes to #index' do
        expect(get('/1/feature')).to route_to('spotlight/feature_pages#index', exhibit_id: '1')
        expect(get('/1/about')).to route_to('spotlight/about_pages#index', exhibit_id: '1')
      end

      it 'routes to #new' do
        expect(get('/1/feature/new')).to route_to('spotlight/feature_pages#new', exhibit_id: '1')
        expect(get('/1/about/new')).to route_to('spotlight/about_pages#new', exhibit_id: '1')
      end

      it 'routes to #show' do
        expect(get('/1/feature/2')).to route_to('spotlight/feature_pages#show', id: '2', exhibit_id: '1')
        expect(get('/1/about/2')).to route_to('spotlight/about_pages#show', id: '2', exhibit_id: '1')
      end

      it 'routes to #edit' do
        expect(get('/1/feature/2/edit')).to route_to('spotlight/feature_pages#edit', id: '2', exhibit_id: '1')
        expect(get('/1/about/2/edit')).to route_to('spotlight/about_pages#edit', id: '2', exhibit_id: '1')
      end

      it 'routes to #create' do
        expect(post('/1/feature')).to route_to('spotlight/feature_pages#create', exhibit_id: '1')
        expect(post('/1/about')).to route_to('spotlight/about_pages#create', exhibit_id: '1')
      end

      it 'routes to #update' do
        expect(put('/1/feature/2')).to route_to('spotlight/feature_pages#update', id: '2', exhibit_id: '1')
        expect(put('/1/about/2')).to route_to('spotlight/about_pages#update', id: '2', exhibit_id: '1')
      end

      it 'routes to #destroy' do
        expect(delete('/1/feature/2')).to route_to('spotlight/feature_pages#destroy', id: '2', exhibit_id: '1')
        expect(delete('/1/about/2')).to route_to('spotlight/about_pages#destroy', id: '2', exhibit_id: '1')
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
blacklight-spotlight-0.18.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.17.1 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.17.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.16.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.15.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.14.2 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.14.1 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.14.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.13.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.12.1 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.12.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.11.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.10.3 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.10.2 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.10.1 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.10.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.9.2 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.9.1 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.9.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-0.8.2 spec/routing/spotlight/pages_routing_spec.rb