Sha256: b21ab60787d050d9414db5301c69ac98f6e320d61d5d30e805a85eae53735684

Contents?: true

Size: 988 Bytes

Versions: 8

Compression:

Stored size: 988 Bytes

Contents

# frozen_string_literal: true
require 'rails_helper'

RSpec.describe PhasesController, type: :routing do
  describe 'routing' do
    it 'routes to #index' do
      expect(get: '/phases').to route_to('phases#index')
    end

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

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

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

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

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

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

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

Version data entries

8 entries across 7 versions & 1 rubygems

Version Path
model_base_generators-0.4.0 examples/rails-5.1/spec/routing/phases_routing_spec.rb
model_base_generators-0.4.0 examples/rails-5.0/spec/routing/phases_routing_spec.rb
model_base_generators-0.3.9 example/spec/routing/phases_routing_spec.rb
model_base_generators-0.3.8 example/spec/routing/phases_routing_spec.rb
model_base_generators-0.3.7 example/spec/routing/phases_routing_spec.rb
model_base_generators-0.3.6 example/spec/routing/phases_routing_spec.rb
model_base_generators-0.3.5 example/spec/routing/phases_routing_spec.rb
model_base_generators-0.3.4 example/spec/routing/phases_routing_spec.rb