Sha256: 094c076ebd8ca9f879625f93b42c1823a071fa8b2f9fd20233a623948ff45668

Contents?: true

Size: 958 Bytes

Versions: 7

Compression:

Stored size: 958 Bytes

Contents

require 'rails_helper'

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

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

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

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

    it 'routes to #index' do
      expect(get('/jpi/v1/impac/organizations/1/widgets')).to route_to('mno_enterprise/jpi/v1/impac/widgets#index', organization_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/widgets_controller_routing_spec.rb
mno-enterprise-api-3.3.3 spec/routing/mno_enterprise/jpi/v1/impac/widgets_controller_routing_spec.rb
mno-enterprise-api-3.3.2 spec/routing/mno_enterprise/jpi/v1/impac/widgets_controller_routing_spec.rb
mno-enterprise-api-3.2.1 spec/routing/mno_enterprise/jpi/v1/impac/widgets_controller_routing_spec.rb
mno-enterprise-api-3.3.1 spec/routing/mno_enterprise/jpi/v1/impac/widgets_controller_routing_spec.rb
mno-enterprise-api-3.3.0 spec/routing/mno_enterprise/jpi/v1/impac/widgets_controller_routing_spec.rb
mno-enterprise-api-3.2.0 spec/routing/mno_enterprise/jpi/v1/impac/widgets_controller_routing_spec.rb