Sha256: 09166bdd6ee88e236e400ea0eec9af1b765465f60d6010ac771ec558f2d701e0

Contents?: true

Size: 1.2 KB

Versions: 30

Compression:

Stored size: 1.2 KB

Contents

require 'rails_helper'

module MnoEnterprise
  RSpec.describe Jpi::V1::TeamsController, type: :routing do
    routes { MnoEnterprise::Engine.routes }
    
    it 'routes to #index' do
      expect(get('/jpi/v1/organizations/1/teams')).to route_to("mno_enterprise/jpi/v1/teams#index", organization_id: '1')
    end
    
    it 'routes to #show' do
      expect(get('/jpi/v1/teams/1')).to route_to("mno_enterprise/jpi/v1/teams#show", id: '1')
    end
    
    it 'routes to #create' do
      expect(post('/jpi/v1/organizations/1/teams')).to route_to("mno_enterprise/jpi/v1/teams#create", organization_id: '1')
    end
    
    it 'routes to #update' do
      expect(put('/jpi/v1/teams/1')).to route_to("mno_enterprise/jpi/v1/teams#update", id: '1')
    end
    
    it 'routes to #add_users' do
      expect(put('/jpi/v1/teams/1/add_users')).to route_to("mno_enterprise/jpi/v1/teams#add_users", id: '1')
    end
    
    it 'routes to #remove_users' do
      expect(put('/jpi/v1/teams/1/remove_users')).to route_to("mno_enterprise/jpi/v1/teams#remove_users", id: '1')
    end
    
    it 'routes to #destroy' do
      expect(delete('/jpi/v1/teams/1')).to route_to("mno_enterprise/jpi/v1/teams#destroy", id: '1')
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
mno-enterprise-api-3.4.0 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.3.3 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.3.2 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.2.1 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.3.1 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.3.0 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.2.0 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.1.4 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.0.7 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-2.0.9 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.1.3 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.0.6 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-2.0.8 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.1.2 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.0.5 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-2.0.7 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-2.0.6 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-2.0.5 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.1.1 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb
mno-enterprise-api-3.0.4 spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb