users: add account upgrade integration tests.

* Test that the user upgrade process integrates with Stripe correctly.
* Replace a deprecated `card` param with `source` in `Stripe::Charge.create`.
* Rescue Stripe::StripeError instead of Stripe::CardError so that we
  handle failures outside of card failures, such as network errors.
This commit is contained in:
evazion
2020-12-13 18:33:46 -06:00
parent c82e05d828
commit 2144f45fa4
4 changed files with 109 additions and 7 deletions

View File

@@ -86,4 +86,5 @@ group :test do
gem "capybara"
gem "selenium-webdriver"
gem "codecov", require: false
gem 'stripe-ruby-mock', require: "stripe_mock"
end