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