Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Fix running tests when spree_backend is not installed
Damian Legawiecb7ed712d0cb2
diff --git a/core/lib/spree/testing_support/authorization_helpers.rb b/core/lib/spree/testing_support/authorization_helpers.rbindex f2b592fd4e..9c6df5e31f 100644--- a/core/lib/spree/testing_support/authorization_helpers.rb+++ b/core/lib/spree/testing_support/authorization_helpers.rb@@ -41,7 +41,9 @@ module Spreebefore doallow(Spree.user_class).to receive(:find_by).and_return(Spree.user_class.new)- allow_any_instance_of(Spree::Admin::BaseController).to receive(:admin_oauth_token).and_return(admin_token)+ if defined?(Spree::Admin)+ allow_any_instance_of(Spree::Admin::BaseController).to receive(:admin_oauth_token).and_return(admin_token)+ endendend