Sha256: 8d4a2f318b9faba41f301d99c85f8618d6bf66e202b1c980c2f8175c6fdee2f0

Contents?: true

Size: 1.16 KB

Versions: 21

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
paid_up-0.13.22 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.21 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.17 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.16 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.14 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.13 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.12 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.11 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.10 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.9 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.8 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.7 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.6 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.5 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.4 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.3 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.2 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.1 spec/routing/paid_up/subscription_spec.rb
paid_up-0.13.0 spec/routing/paid_up/subscription_spec.rb
paid_up-0.12.4 spec/routing/paid_up/subscription_spec.rb