diff --git a/spec/features/consumer/producers_spec.rb b/spec/features/consumer/producers_spec.rb index f8d7e3bb57..11d2e52cf6 100644 --- a/spec/features/consumer/producers_spec.rb +++ b/spec/features/consumer/producers_spec.rb @@ -22,10 +22,6 @@ feature ' let(:shop) { create(:distributor_enterprise) } let!(:er) { create(:enterprise_relationship, parent: shop, child: producer1) } - before :each do - use_api_as_unauthenticated_user - end - before do product1.set_property 'Organic', 'NASAA 12345' product2.set_property 'Biodynamic', 'ABC123' diff --git a/spec/features/consumer/shops_spec.rb b/spec/features/consumer/shops_spec.rb index 87db26883c..891ba07e8b 100644 --- a/spec/features/consumer/shops_spec.rb +++ b/spec/features/consumer/shops_spec.rb @@ -14,10 +14,6 @@ feature 'Shops', js: true do let!(:producer) { create(:supplier_enterprise) } let!(:er) { create(:enterprise_relationship, parent: distributor, child: producer) } - before :each do - use_api_as_unauthenticated_user - end - before do producer.set_producer_property 'Organic', 'NASAA 12345' end diff --git a/spec/support/request/authentication_workflow.rb b/spec/support/request/authentication_workflow.rb index 842a215508..0eb32e3e7a 100644 --- a/spec/support/request/authentication_workflow.rb +++ b/spec/support/request/authentication_workflow.rb @@ -68,12 +68,6 @@ module AuthenticationWorkflow fill_in "password", with: user.password click_button "Login" end - - def use_api_as_unauthenticated_user - allow_any_instance_of(Api::BaseController).to receive(:spree_current_user) { - Spree::User.anonymous! - } - end end RSpec.configure do |config|