Skip to content

armgit / spree

Public Imported from GitHub
0

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.

Add missing spree preferences reset in API specs (#11324)

Damian Legawiec01ab07741e7c
diff --git a/api/spec/spec_helper.rb b/api/spec/spec_helper.rb
index 74a8d04e9e..ca7c3566be 100644
--- a/api/spec/spec_helper.rb
+++ b/api/spec/spec_helper.rb
@@ -60,10 +60,12 @@ RSpec.configure do |config|
config.include Spree::Api::TestingSupport::Helpers, type: :controller
config.include Spree::Api::TestingSupport::Helpers, type: :request
config.extend Spree::Api::TestingSupport::Setup, type: :controller
- config.include Spree::TestingSupport::Preferences, type: :controller
+ config.include Spree::TestingSupport::Preferences
config.include Spree::TestingSupport::ImageHelpers
config.before do
+ reset_spree_preferences
+
Spree::Api::Config[:requires_authentication] = true
country = create(:country, name: 'United States of America', iso_name: 'UNITED STATES', iso: 'US', states_required: true)