Sha256: f7b8c6a2be265ca2b471acf8dcf8bd85f83bc94eaafb08e7dd12629421ff124c

Contents?: true

Size: 929 Bytes

Versions: 21

Compression:

Stored size: 929 Bytes

Contents

require 'rails_helper'

describe 'PaidUp::Routing' do
  include_context 'loaded site'
  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

21 entries across 21 versions & 1 rubygems

Version Path
paid_up-0.9.13 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.12 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.11 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.10 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.9 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.8 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.7 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.6 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.5 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.4 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.3 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.2 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.1 spec/routing/paid_up/subscription_spec.rb
paid_up-0.9.0 spec/routing/paid_up/subscription_spec.rb
paid_up-0.8.1 spec/routing/paid_up/subscription_spec.rb
paid_up-0.7.11 spec/routing/paid_up/subscription_spec.rb
paid_up-0.7.10 spec/routing/paid_up/subscription_spec.rb
paid_up-0.7.9 spec/routing/paid_up/subscription_spec.rb
paid_up-0.7.8 spec/routing/paid_up/subscription_spec.rb
paid_up-0.7.7 spec/routing/paid_up/subscription_spec.rb