StripeConnect has been replaced by StripeSCA. But we still have some
StripeConnect payment methods in our production databases. We need to
convert them to StripeSCA methods before we can remove the related
code and clean up. Otherwise our code would raise errors when
encountering an old StripeConnect method, not knowing what that is.
Unfortunately, loading the migration code also reloads some Spree models
which causes errors later on. Another spec was failing with:
1) full-page cart viewing the cart when a product is soft-deleted shows the cart without errors
Failure/Error: variant.instance_variable_set :@hub, @hub
FrozenError:
can't modify frozen NilClass: nil
# ./lib/open_food_network/scope_variant_to_hub.rb:12:in `instance_variable_set'
The command to reproduce was:
rspec ./spec/features/consumer/shopping/cart_spec.rb[1:1:3:1]\
./spec/migrations/migrate_enterprise_fee_tax_amounts_spec.rb[1:1:1:1] --seed 0
I couldn't find a quick solution to make the migration not use app code.
Since the migration is a historical record now, it doesn't need repeated
testing.