Sha256: db315434410ba083ec9d70344d8b112ff9e430988c0798429b6a05348a35e096

Contents?: true

Size: 1.27 KB

Versions: 10

Compression:

Stored size: 1.27 KB

Contents

# frozen_string_literal: true

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

10 entries across 10 versions & 1 rubygems

Version Path
works_cited-0.1.14 spec/routing/works_cited/citations_routing_spec.rb
works_cited-0.1.13 spec/routing/works_cited/citations_routing_spec.rb
works_cited-0.1.11 spec/routing/works_cited/citations_routing_spec.rb
works_cited-0.1.10 spec/routing/works_cited/citations_routing_spec.rb
works_cited-0.1.9 spec/routing/works_cited/citations_routing_spec.rb
works_cited-0.1.8 spec/routing/works_cited/citations_routing_spec.rb
works_cited-0.1.7 spec/routing/works_cited/citations_routing_spec.rb
works_cited-0.1.6 spec/routing/works_cited/citations_routing_spec.rb
works_cited-0.1.5 spec/routing/works_cited/citations_routing_spec.rb
works_cited-0.1.4 spec/routing/works_cited/citations_routing_spec.rb