Andrew Brown
0e34c7ac5a
stripe upgrade fix
2025-07-16 18:01:07 -07:00
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
9de0e4666f
remove factorybot
2021-05-21 13:35:55 -07:00
Andrew Brown
7451cd5013
comment out unused specs
2021-05-21 13:23:07 -07:00
Andrew Brown
e8c72face9
update user factory for tests
2020-03-02 13:44:52 -06: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
553e28355d
test deprecations
2018-09-07 21:03:56 -05:00
Andrew Brown
b55aac0005
comment out outdated specs
2018-09-04 02:48:53 -05:00
Andrew Brown
1a03148cfa
fix rspec tests
2018-08-31 19:38:48 -05:00
Andrew Brown
7a4c9dfbc1
update tests for 5.2
2018-07-05 02:07:12 -05:00
Tristan
7b9bd4b150
swap factory_girl with factory_bot
2018-06-05 23:45:39 -05:00
Tristan
4142508c08
Include simplecov manually
2018-06-05 21:51:42 -05:00
Andrew Brown
99deb598bb
update admin panel tests
2018-01-14 09:52:15 -06: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
1d3363b6d0
Merge branch 'master' into issue#190
2017-11-24 14:30:15 +01:00
Andrew Brown
91aac1622d
add test for upgrading to premium
2017-11-10 16:38:21 +02:00
Babu Thomas
a03a0c9fdb
Add deletion test for sibling relation
2017-11-06 02:42:40 +05:30
Andrew Brown
eba5096129
Require user presence on universe
2017-10-01 12:23:52 +02:00
Andrew Brown
fb602b7d95
Fix tests that were creating a universe with no user
2017-10-01 12:21:53 +02:00
Andrew Brown
0019e894db
Tests for admin auth
2017-02-03 14:59:37 +00: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
Mitchel Pigsley
0e0a1dc7f5
Fix duplicate keys in tests
2016-11-03 18:37:51 -05:00
Mitchel Pigsley
aff0f9646c
Update some tests
2016-11-03 18:29:15 -05:00
Matthew Werner
72c66a60cb
Attribute Field Dropdowns
2016-10-31 16:32:41 -07:00
Matthew Werner
0c84046330
clean up unnecessary changes
2016-10-25 16:48:07 -07:00
Matthew Werner
5a3cfcb6d1
Convert attribute_categories to system categories
2016-10-10 14:47:51 -07:00
Robert Richter
901d76c890
Make serendipitous card more robust
2016-10-02 14:47:52 -05:00
Robert Richter
c0cc119cd7
Resolve Devise deprecation warning
2016-10-02 12:49:24 -05:00
Robert Richter
45e452651a
Make rubocop changes
2016-10-01 19:00:09 -05:00
Robert Richter
56b744a858
Add coverage report
2016-10-01 18:46:08 -05:00
Robert Richter
3ad2a19172
Write main and write controller spec
2016-10-01 13:33:27 -05:00
Robert Richter
ed469df43f
Write locations generator controller spec
2016-10-01 13:29:55 -05:00
Robert Richter
411952ece6
Write equipment generator controller spec
2016-10-01 13:16:51 -05:00
Robert Richter
8e53097d8b
Write character generator controller spec
2016-10-01 12:54:14 -05:00
Robert Richter
d22ada1714
Write specs for items, locations, and universes
2016-10-01 12:25:35 -05:00
Robert Richter
1ce16228a7
Extract content tests into an example
2016-10-01 12:21:19 -05:00
Robert Richter
5977df3968
Write CharactersController spec
2016-10-01 11:57:43 -05:00
Robert Richter
040ff57723
Migrate AdminController to spec
2016-10-01 11:30:34 -05:00
Robert Richter
e99ea9e596
Properly add and configure shoulda
2016-10-01 11:27:34 -05:00
Robert Richter
58d2f8cc3c
Use shoulda matchers
2016-10-01 11:15:09 -05:00
Robert Richter
3c446544fb
Migrate UsersController to rspec
2016-09-30 20:50:59 -05:00
Robert Richter
ae2460384a
Write user spec
2016-09-30 20:28:53 -05:00
Robert Richter
886db9b8c3
Write universe spec
2016-09-30 20:24:15 -05:00
Robert Richter
4fb6e0ebf7
Add location spec
2016-09-30 20:22:43 -05:00