mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Provide a Stripe client_id for StripeAccountsController spec
This commit is contained in:
@@ -3,6 +3,10 @@ require 'spec_helper'
|
||||
describe Admin::StripeAccountsController, type: :controller do
|
||||
let(:enterprise) { create(:distributor_enterprise) }
|
||||
|
||||
before do
|
||||
allow(Stripe).to receive(:client_id) { "some_id" }
|
||||
end
|
||||
|
||||
describe "#connect" do
|
||||
before do
|
||||
allow(controller).to receive(:spree_current_user) { enterprise.owner }
|
||||
@@ -178,7 +182,7 @@ describe Admin::StripeAccountsController, type: :controller do
|
||||
let(:params) { { format: :json } }
|
||||
|
||||
before do
|
||||
Stripe.api_key = "sk_test_12345"
|
||||
allow(Stripe).to receive(:api_key) { "sk_test_12345" }
|
||||
Spree::Config.set(stripe_connect_enabled: false)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user