Sha256: 7b59ac61abd869e4ea8cd0a676f24f6a877b1afdc48fa72f2ab3fac14b39614a

Contents?: true

Size: 1.33 KB

Versions: 4

Compression:

Stored size: 1.33 KB

Contents

require 'rails_helper'

module CitizenBudgetModel
  RSpec.describe SectionsController, type: :routing do
    describe 'routing' do
      routes { Engine.routes }

      it 'routes to #new' do
        expect(get: '/simulators/2/sections/new').to route_to('citizen_budget_model/sections#new', simulator_id: '2')
      end

      it 'routes to #show' do
        expect(get: '/simulators/2/sections/1').to route_to('citizen_budget_model/sections#show', id: '1', simulator_id: '2')
      end

      it 'routes to #edit' do
        expect(get: '/simulators/2/sections/1/edit').to route_to('citizen_budget_model/sections#edit', id: '1', simulator_id: '2')
      end

      it 'routes to #create' do
        expect(post: '/simulators/2/sections').to route_to('citizen_budget_model/sections#create', simulator_id: '2')
      end

      it 'routes to #update' do
        expect(put: '/simulators/2/sections/1').to route_to('citizen_budget_model/sections#update', id: '1', simulator_id: '2')
      end

      it 'routes to #destroy' do
        expect(delete: '/simulators/2/sections/1').to route_to('citizen_budget_model/sections#destroy', id: '1', simulator_id: '2')
      end

      it 'routes to #sort' do
        expect(post: '/simulators/2/sections/1/sort').to route_to('citizen_budget_model/sections#sort', id: '1', simulator_id: '2')
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
citizen_budget_model-0.0.4 spec/routing/citizen_budget_model/sections_routing_spec.rb
citizen_budget_model-0.0.3 spec/routing/citizen_budget_model/sections_routing_spec.rb
citizen_budget_model-0.0.2 spec/routing/citizen_budget_model/sections_routing_spec.rb
citizen_budget_model-0.0.1 spec/routing/citizen_budget_model/sections_routing_spec.rb