Sha256: 2fc94e5daf618d250d52f31de7c0db0fc018bdb093f42213bef55e8323bf1101

Contents?: true

Size: 1.07 KB

Versions: 6

Compression:

Stored size: 1.07 KB

Contents

require "rails_helper"

module Tang
  RSpec.describe Admin::SubscriptionsController, type: :routing do
    routes { Tang::Engine.routes }
    describe "routing" do

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

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

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

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

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

      it "routes to #destroy" do
        expect(:delete => "/admin/subscriptions/1").to route_to("tang/admin/subscriptions#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/subscriptions_routing_spec.rb
tang-0.2.0 spec/routing/tang/admin/subscriptions_routing_spec.rb
tang-0.1.0 spec/routing/tang/admin/subscriptions_routing_spec.rb
tang-0.0.9 spec/routing/tang/admin/subscriptions_routing_spec.rb
tang-0.0.8 spec/routing/tang/admin/subscriptions_routing_spec.rb
tang-0.0.1 spec/routing/tang/admin/subscriptions_routing_spec.rb