Sha256: bf36b9497c78eb50a9cd8923748e470adc5da43fc883187808718780fe6736f7

Contents?: true

Size: 936 Bytes

Versions: 36

Compression:

Stored size: 936 Bytes

Contents

require 'rails_helper'

describe 'PaidUp::Routing' do
  include_context 'plans and features'
  routes { PaidUp::Engine.routes }

  describe 'nested resource' do
    context "routes to a new subscription for a plan" do
      subject { get new_plan_subscription_path(professional_plan) }
      it { should route_to(:controller => "paid_up/subscriptions", :action => "new", :plan_id => professional_plan.id.to_s) }
    end
    context "routes to create a subscription for a plan" do
      subject { post plan_subscriptions_path(professional_plan) }
      it { should route_to(:controller => "paid_up/subscriptions", :action => "create", :plan_id => professional_plan.id.to_s) }
    end
  end
  describe 'top-level resource' do
    context "routes to a display of subscriptions for a user" do
      subject { get subscriptions_path }
      it { should route_to(:controller => "paid_up/subscriptions", :action => "index") }
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
paid_up-0.7.5 spec/routing/paid_up/subscription_spec.rb
paid_up-0.7.4 spec/routing/paid_up/subscription_spec.rb
paid_up-0.7.3 spec/routing/paid_up/subscription_spec.rb
paid_up-0.7.2 spec/routing/paid_up/subscription_spec.rb
paid_up-0.7.1 spec/routing/paid_up/subscription_spec.rb
paid_up-0.7.0 spec/routing/paid_up/subscription_spec.rb
paid_up-0.6.5 spec/routing/paid_up/subscription_spec.rb
paid_up-0.6.4 spec/routing/paid_up/subscription_spec.rb
paid_up-0.6.3 spec/routing/paid_up/subscription_spec.rb
paid_up-0.6.2 spec/routing/paid_up/subscription_spec.rb
paid_up-0.6.1 spec/routing/paid_up/subscription_spec.rb
paid_up-0.6.0 spec/routing/paid_up/subscription_spec.rb
paid_up-0.5.3 spec/routing/paid_up/subscription_spec.rb
paid_up-0.5.2 spec/routing/paid_up/subscription_spec.rb
paid_up-0.5.1 spec/routing/paid_up/subscription_spec.rb
paid_up-0.5.0 spec/routing/paid_up/subscription_spec.rb
paid_up-0.4.4 spec/routing/paid_up/subscription_spec.rb
paid_up-0.4.3 spec/routing/paid_up/subscription_spec.rb
paid_up-0.4.2 spec/routing/paid_up/subscription_spec.rb
paid_up-0.4.1 spec/routing/paid_up/subscription_spec.rb