Transpec spec/performance/shop_controller_spec

This commit is contained in:
luisramos0
2019-09-19 20:36:33 +01:00
parent 3c412b7b7d
commit 6b0f3cd4f3

View File

@@ -6,8 +6,8 @@ describe ShopController, type: :controller, performance: true do
let(:order_cycle) { create(:simple_order_cycle, distributors: [d], coordinator_fees: [enterprise_fee]) }
before do
controller.stub(:current_distributor) { d }
controller.stub(:current_order_cycle) { order_cycle }
allow(controller).to receive(:current_distributor) { d }
allow(controller).to receive(:current_order_cycle) { order_cycle }
Spree::Config.currency = 'AUD'
end
@@ -36,7 +36,7 @@ describe ShopController, type: :controller, performance: true do
it "returns products via json" do
results = multi_benchmark(3, cache_key_patterns: cache_key_patterns) do
xhr :get, :products
response.should be_success
expect(response).to be_success
end
end
end