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.

Admin: Remove `respond_with` from Properties (#12436)

Damian Legawiec256bf0aa2f9b
diff --git a/admin/app/controllers/spree/admin/properties_controller.rb b/admin/app/controllers/spree/admin/properties_controller.rb
index 2c37ea7f1d..34e65738fc 100644
--- a/admin/app/controllers/spree/admin/properties_controller.rb
+++ b/admin/app/controllers/spree/admin/properties_controller.rb
@@ -1,10 +1,6 @@
module Spree
module Admin
class PropertiesController < ResourceController
- def index
- respond_with(@collection)
- end
-
protected
def update_turbo_stream_enabled?
diff --git a/admin/spec/controllers/spree/admin/properties_controller_spec.rb b/admin/spec/controllers/spree/admin/properties_controller_spec.rb
index b70b053633..32c80e8bac 100644
--- a/admin/spec/controllers/spree/admin/properties_controller_spec.rb
+++ b/admin/spec/controllers/spree/admin/properties_controller_spec.rb
@@ -3,8 +3,14 @@ require 'spec_helper'
describe Spree::Admin::PropertiesController, type: :controller do
stub_authorization!
+ render_views
+
let(:store) { Spree::Store.default }
+ before do
+ allow(controller).to receive(:current_store).and_return(store)
+ end
+
describe '#index' do
let!(:property) { create(:property, name: 'Ingredients', presentation: 'Product Ingredients') }