Sha256: 93c8e83423849698789652ddd983f697a302626b772d7387f10aa4c0861bec44

Contents?: true

Size: 893 Bytes

Versions: 7

Compression:

Stored size: 893 Bytes

Contents

require 'rails_helper'

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

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

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

    it 'routes to #destroy' do
      expect(delete('/jpi/v1/impac/alerts/2')).to route_to('mno_enterprise/jpi/v1/impac/alerts#destroy', id: '2')
    end
  
    it 'routes to #create (kpi nested)' do
      expect(post('/jpi/v1/impac/kpis/2/alerts')).to route_to('mno_enterprise/jpi/v1/impac/alerts#create', kpi_id: '2')
    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/alerts_controller_routing_spec.rb
mno-enterprise-api-3.3.3 spec/routing/mno_enterprise/jpi/v1/impac/alerts_controller_routing_spec.rb
mno-enterprise-api-3.3.2 spec/routing/mno_enterprise/jpi/v1/impac/alerts_controller_routing_spec.rb
mno-enterprise-api-3.2.1 spec/routing/mno_enterprise/jpi/v1/impac/alerts_controller_routing_spec.rb
mno-enterprise-api-3.3.1 spec/routing/mno_enterprise/jpi/v1/impac/alerts_controller_routing_spec.rb
mno-enterprise-api-3.3.0 spec/routing/mno_enterprise/jpi/v1/impac/alerts_controller_routing_spec.rb
mno-enterprise-api-3.2.0 spec/routing/mno_enterprise/jpi/v1/impac/alerts_controller_routing_spec.rb