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

@@ -134,6 +134,7 @@ GEM
concurrent-ruby (1.1.7)
crass (1.0.6)
daemons (1.3.1)
dante (0.2.0)
delayed_job (4.1.8)
activesupport (>= 3.0, < 6.1)
delayed_job_active_record (4.1.4)
@@ -354,6 +355,10 @@ GEM
streamio-ffmpeg (3.0.2)
multi_json (~> 1.8)
stripe (5.28.0)
stripe-ruby-mock (3.0.1)
dante (>= 0.2.0)
multi_json (~> 1.0)
stripe (> 5, < 6)
thor (1.0.1)
thread_safe (0.3.6)
tzinfo (1.2.8)
@@ -452,6 +457,7 @@ DEPENDENCIES
stackprof
streamio-ffmpeg
stripe
stripe-ruby-mock
unicorn
unicorn-worker-killer
webpacker (>= 4.0.x)