Sha256: 561ef7a1c0767020cc52951d3b2a5a24f98833befb22481d7880205359a9e10f

Contents?: true

Size: 1.93 KB

Versions: 20

Compression:

Stored size: 1.93 KB

Contents

require "rails_helper"

module CustomerVault
  RSpec.describe CorporationsController, :type => :routing do
    routes { CustomerVault::Engine.routes }
    describe "routing" do
      it "routes to #new" do
        expect(:get => "/corporations/new").to route_to("customer_vault/corporations#new")
      end

      it "routes to #show" do
        expect(:get => "/corporations/1").to route_to("customer_vault/corporations#show", :id => "1")
      end

      it "routes to #edit" do
        expect(:get => "/corporations/1/edit").to route_to("customer_vault/corporations#edit", :id => "1")
      end

      it "routes to #create" do
        expect(:post => "/corporations").to route_to("customer_vault/corporations#create")
      end

      it "routes to #update" do
        expect(:put => "/corporations/1").to route_to("customer_vault/corporations#update", :id => "1")
      end

      it "routes to #destroy" do
        expect(:delete => "/corporations/1").to route_to("customer_vault/corporations#destroy", :id => "1")
      end

      describe 'links' do
        it "routes to links#new" do
          expect(:get => "/corporations/1/links/new").to route_to("customer_vault/links#new", :corporation_id => "1")
        end

        it "routes to links#edit" do
          expect(:get => "/corporations/1/links/2/edit").to route_to("customer_vault/links#edit", :corporation_id => "1", :id => "2")
        end

        it "routes to links#create" do
          expect(:post => "/corporations/1/links").to route_to("customer_vault/links#create", :corporation_id => "1")
        end

        it "routes to links#update" do
          expect(:put => "/corporations/1/links/2").to route_to("customer_vault/links#update", :corporation_id => "1", :id => "2")
        end

        it "routes to links#destroy" do
          expect(:delete => "/corporations/1/links/2").to route_to("customer_vault/links#destroy", :corporation_id => "1", :id => "2")
        end
      end

    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
customer_vault-1.3.2 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.3.1 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.3.0 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.2.10 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.2.9 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.2.8 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.2.7 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.2.6 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.2.5 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.2.4 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.2.3 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.2.2 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.2.1 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.2.0 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.1.0 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.0.4 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.0.3 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.0.2 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.0.1 spec/routing/customer_vault/corporations_routing_spec.rb
customer_vault-1.0.0 spec/routing/customer_vault/corporations_routing_spec.rb