Sha256: 0b895bbb0bdfdf1ca50b60aa8e2b95086bb139337590458b6d5fd89d85093ce8

Contents?: true

Size: 1.21 KB

Versions: 6

Compression:

Stored size: 1.21 KB

Contents

require "rails_helper"

module Tang
  RSpec.describe Admin::PlansController, type: :routing do

    routes { Tang::Engine.routes }

    describe "routing" do

      it "routes to #index" do
        expect(:get => "/admin/plans").to route_to("tang/admin/plans#index")
      end

      it "routes to #new" do
        expect(:get => "/admin/plans/new").to route_to("tang/admin/plans#new")
      end

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

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

      it "routes to #create" do
        expect(:post => "/admin/plans").to route_to("tang/admin/plans#create")
      end

      it "routes to #update via PUT" do
        expect(:put => "/admin/plans/1").to route_to("tang/admin/plans#update", :id => "1")
      end

      it "routes to #update via PATCH" do
        expect(:patch => "/admin/plans/1").to route_to("tang/admin/plans#update", :id => "1")
      end

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

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tang-0.2.1 spec/routing/tang/admin/plans_routing_spec.rb
tang-0.2.0 spec/routing/tang/admin/plans_routing_spec.rb
tang-0.1.0 spec/routing/tang/admin/plans_routing_spec.rb
tang-0.0.9 spec/routing/tang/admin/plans_routing_spec.rb
tang-0.0.8 spec/routing/tang/admin/plans_routing_spec.rb
tang-0.0.1 spec/routing/tang/admin/plans_routing_spec.rb