Sha256: ff17dde5c4cbf99914bf6e367cc25784f22f27c7731e6e49d724cc761c404a8f

Contents?: true

Size: 1 KB

Versions: 7

Compression:

Stored size: 1 KB

Contents

require 'rails_helper'

module MnoEnterprise
  RSpec.describe Jpi::V1::Impac::KpisController, type: :routing do
    routes { MnoEnterprise::Engine.routes }

    it 'routes to #index' do
      expect(get('/jpi/v1/impac/kpis')).to route_to('mno_enterprise/jpi/v1/impac/kpis#index')
    end

    it 'routes to #show' do
      expect(get('/jpi/v1/impac/kpis/2')).to route_to('mno_enterprise/jpi/v1/impac/kpis#show', id: '2')
    end

    it 'routes to #update' do
      expect(put('/jpi/v1/impac/kpis/2')).to route_to('mno_enterprise/jpi/v1/impac/kpis#update', id: '2')
      expect(patch('/jpi/v1/impac/kpis/2')).to route_to('mno_enterprise/jpi/v1/impac/kpis#update', id: '2')
    end

    it 'routes to #destroy' do
      expect(delete('/jpi/v1/impac/kpis/2')).to route_to('mno_enterprise/jpi/v1/impac/kpis#destroy', id: '2')
    end

    it 'routes to #create (dashboard nested)' do
      expect(post('/jpi/v1/impac/dashboards/1/kpis')).to route_to('mno_enterprise/jpi/v1/impac/kpis#create', dashboard_id: '1')
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mno-enterprise-api-3.4.0 spec/routing/mno_enterprise/jpi/v1/impac/kpis_controller_routing_spec.rb
mno-enterprise-api-3.3.3 spec/routing/mno_enterprise/jpi/v1/impac/kpis_controller_routing_spec.rb
mno-enterprise-api-3.3.2 spec/routing/mno_enterprise/jpi/v1/impac/kpis_controller_routing_spec.rb
mno-enterprise-api-3.2.1 spec/routing/mno_enterprise/jpi/v1/impac/kpis_controller_routing_spec.rb
mno-enterprise-api-3.3.1 spec/routing/mno_enterprise/jpi/v1/impac/kpis_controller_routing_spec.rb
mno-enterprise-api-3.3.0 spec/routing/mno_enterprise/jpi/v1/impac/kpis_controller_routing_spec.rb
mno-enterprise-api-3.2.0 spec/routing/mno_enterprise/jpi/v1/impac/kpis_controller_routing_spec.rb