mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Transpec spec/performance/shop_controller_spec
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user