Sha256: 39c4add005f81b6a4fd926fd64eade3b2eb2e00072de3c8570c046a301b7af70

Contents?: true

Size: 1.81 KB

Versions: 40

Compression:

Stored size: 1.81 KB

Contents

# frozen_string_literal: true

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

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.3.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.2.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.1.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.3 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.2 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.1 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0.rc3 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0.rc2 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0.rc1 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0.alpha.10 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0.alpha.9 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0.alpha.8 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0.alpha.7 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0.alpha.6 spec/routing/spotlight/pages_routing_spec.rb
blacklight-spotlight-3.0.0.alpha.5 spec/routing/spotlight/pages_routing_spec.rb