Skip to content

Commit

Permalink
Set Stripe plan ID with one I've created in test
Browse files Browse the repository at this point in the history
  • Loading branch information
henare committed Aug 11, 2015
1 parent 1099524 commit a3c4a30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/controllers/subscriptions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def create
card: params[:stripeToken],
description: "PlanningAlerts subscriber"
)
# TODO: Set the plan ID correctly
stripe_subscription = customer.subscriptions.create(plan: "TODO")
stripe_subscription = customer.subscriptions.create(plan: "planningalerts")
subscription.update!(stripe_subscription_id: stripe_subscription.id, stripe_customer_id: customer.id)
end

Expand Down
3 changes: 1 addition & 2 deletions spec/features/subscription_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
let(:stripe_helper) { StripeMock.create_test_helper }
before do
StripeMock.start
# TODO: Set the plan ID correctly
# When plan is set to 0 StripeMock doesn't check for the card number when creating the customer
# FIXME: StripeMock should create a customer when only a token is supplied
stripe_helper.create_plan(id: "TODO", amount: 0)
stripe_helper.create_plan(id: "planningalerts", amount: 0)
end
after { StripeMock.stop }

Expand Down

0 comments on commit a3c4a30

Please sign in to comment.