mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Redirect to #/payment methods from stripe connect callback
This commit is contained in:
@@ -15,7 +15,7 @@ module Admin
|
||||
connector = Stripe::AccountConnector.new(spree_current_user, params)
|
||||
if connector.create_account
|
||||
flash[:success] = t('admin.controllers.enterprises.stripe_connect_success')
|
||||
redirect_to main_app.edit_admin_enterprise_path(connector.enterprise)
|
||||
redirect_to main_app.edit_admin_enterprise_path(connector.enterprise, anchor: 'payment_methods')
|
||||
else
|
||||
render text: t('admin.controllers.enterprises.stripe_connect_fail'), status: 500
|
||||
end
|
||||
|
||||
@@ -61,7 +61,7 @@ describe Admin::StripeAccountsController, type: :controller do
|
||||
expect(connector).to receive(:enterprise) { enterprise }
|
||||
spree_get :connect_callback, params
|
||||
expect(flash[:success]).to eq I18n.t('admin.controllers.enterprises.stripe_connect_success')
|
||||
expect(response).to redirect_to edit_admin_enterprise_path(enterprise)
|
||||
expect(response).to redirect_to edit_admin_enterprise_path(enterprise, anchor: 'payment_methods')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user