Sha256: 5caf9c44653ecbaffbb0a972f019af1dfeaa4eb8280e9d34e50939e59b0432ee

Contents?: true

Size: 1.36 KB

Versions: 30

Compression:

Stored size: 1.36 KB

Contents

require "rails_helper"

module MnoEnterprise
  RSpec.describe Webhook::OAuthController, type: :routing do
    routes { MnoEnterprise::Engine.routes }
    
    it "routes to #authorize" do
      expect(get("/webhook/oauth/cld-1f47d5s4/authorize")).to route_to("mno_enterprise/webhook/o_auth#authorize", id: 'cld-1f47d5s4')
      expect(get("/webhook/oauth/bla.mcube.co/authorize")).to route_to("mno_enterprise/webhook/o_auth#authorize", id: 'bla.mcube.co')
    end
    
    it "routes to #callback" do
      expect(get("/webhook/oauth/cld-1f47d5s4/callback")).to route_to("mno_enterprise/webhook/o_auth#callback", id: 'cld-1f47d5s4')
      expect(get("/webhook/oauth/bla.mcube.co/callback")).to route_to("mno_enterprise/webhook/o_auth#callback", id: 'bla.mcube.co')
    end
    
    it "routes to #disconnect" do
      expect(get("/webhook/oauth/cld-1f47d5s4/disconnect")).to route_to("mno_enterprise/webhook/o_auth#disconnect", id: 'cld-1f47d5s4')
      expect(get("/webhook/oauth/bla.mcube.co/disconnect")).to route_to("mno_enterprise/webhook/o_auth#disconnect", id: 'bla.mcube.co')
    end
    
    it "routes to #sync" do
      expect(get("/webhook/oauth/cld-1f47d5s4/sync")).to route_to("mno_enterprise/webhook/o_auth#sync", id: 'cld-1f47d5s4')
      expect(get("/webhook/oauth/bla.mcube.co/sync")).to route_to("mno_enterprise/webhook/o_auth#sync", id: 'bla.mcube.co')
    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/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.3.3 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.3.2 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.2.1 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.3.1 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.3.0 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.2.0 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.1.4 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.0.7 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-2.0.9 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.1.3 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.0.6 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-2.0.8 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.1.2 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.0.5 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-2.0.7 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-2.0.6 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-2.0.5 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.1.1 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb
mno-enterprise-api-3.0.4 spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb