Commit Graph

13 Commits

Author SHA1 Message Date
Andrew Brown
ac96a001a8 Fix Stripe subscription errors by migrating deprecated sources API to payment_methods API
- Migrate from deprecated sources API to modern payment_methods API in SubscriptionsController
- Update subscription plan modifications to use Subscription.modify instead of direct assignment
- Fix payment method creation/deletion to use PaymentMethod.create/detach instead of sources
- Update view templates to use new payment_methods data structure
- Migrate price.id usage from deprecated plan.id in data integrity tasks
- Add comprehensive test suite with proper Stripe API stubs
- Add missing test gems: rspec-rails, webmock, factory_bot_rails, shoulda-matchers

This resolves Error 500 when users try to upgrade to Premium subscriptions.
The original error was: NoMethodError - undefined method 'total_count' for nil:NilClass
caused by stripe_customer.sources.total_count when sources API returned nil.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 23:40:36 -07:00
Andrew Brown
7451cd5013 comment out unused specs 2021-05-21 13:23:07 -07:00
Andrew Brown
1e54caf237 zzz 2019-05-30 16:28:00 -05:00
Andrew Brown
9ac979ec45 parallel tests are hard 2019-05-30 16:15:39 -05:00
Andrew Brown
32161f3dd3 lil cleanup 2019-05-12 22:55:07 -05:00
Andrew Brown
9cfac97969 fix tests 2019-05-12 21:45:46 -05:00
Andrew Brown
05f8174463 fix a couple tests 2019-04-03 18:56:52 -05:00
Andrew Brown
7a4c9dfbc1 update tests for 5.2 2018-07-05 02:07:12 -05:00
Andrew Brown
e0fcc4ee6d actually test what was meant to be tested 2017-11-24 16:18:40 +01:00
Andrew Brown
0d0334ae3d add tests for storage space adjustments 2017-11-24 16:14:25 +01:00
Andrew Brown
91aac1622d add test for upgrading to premium 2017-11-10 16:38:21 +02:00
Andrew Brown
defba2249b Tests for changing subscriptions and resulting permissions 2017-01-25 19:14:29 +00:00
Andrew Brown
2363a29b36 Start on subscription controller specs #wip 2017-01-24 19:14:50 +00:00