Sha256: a4cb5a0347247ff827749980c8db3467568e9c7c0a01a9b7809b1e58bc0d4c64

Contents?: true

Size: 1.24 KB

Versions: 4

Compression:

Stored size: 1.24 KB

Contents

require 'rails_helper'

RSpec.describe WorksCited::CitationsController, type: :routing do
  routes { WorksCited::Engine.routes }

  describe 'routing' do
    it 'routes to #index' do
      expect(get: '/citations').to route_to('works_cited/citations#index')
    end

    it 'routes to #preview' do
      expect(patch: '/preview').to route_to('works_cited/citations#preview')
    end

    it 'routes to #new' do
      expect(get: '/citations/new').to route_to('works_cited/citations#new')
    end

    it 'routes to #show' do
      expect(get: '/citations/1').to route_to('works_cited/citations#show', id: '1')
    end

    it 'routes to #edit' do
      expect(get: '/citations/1/edit').to route_to('works_cited/citations#edit', id: '1')
    end

    it 'routes to #create' do
      expect(post: '/citations').to route_to('works_cited/citations#create')
    end

    it 'routes to #update via PUT' do
      expect(put: '/citations/1').to route_to('works_cited/citations#update', id: '1')
    end

    it 'routes to #update via PATCH' do
      expect(patch: '/citations/1').to route_to('works_cited/citations#update', id: '1')
    end

    it 'routes to #destroy' do
      expect(delete: '/citations/1').to route_to('works_cited/citations#destroy', id: '1')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
works_cited-0.1.3 spec/routing/works_cited/citations_routing_spec.rb
works_cited-0.1.2 spec/routing/works_cited/citations_routing_spec.rb
works_cited-0.1.1 spec/routing/works_cited/citations_routing_spec.rb
works_cited-0.1.0 spec/routing/works_cited/citations_routing_spec.rb