Sha256: fd911aa6c4dcc55009c1584496bb86f1dc017c49639d5db8d7e9f80a5e4240f1

Contents?: true

Size: 1.91 KB

Versions: 20

Compression:

Stored size: 1.91 KB

Contents

require "rails_helper"

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

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

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

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

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

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

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

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

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

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

        it "routes to links#destroy" do
          expect(:delete => "/individuals/1/links/2").to route_to("customer_vault/links#destroy", :individual_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/individual_routing_spec.rb
customer_vault-1.3.1 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.3.0 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.2.10 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.2.9 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.2.8 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.2.7 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.2.6 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.2.5 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.2.4 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.2.3 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.2.2 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.2.1 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.2.0 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.1.0 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.0.4 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.0.3 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.0.2 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.0.1 spec/routing/customer_vault/individual_routing_spec.rb
customer_vault-1.0.0 spec/routing/customer_vault/individual_routing_spec.rb