From 493adc8b1fd9bfb79b72a9a526539003b2f4e17c Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Fri, 15 May 2020 16:27:18 +0100 Subject: [PATCH] Fix problem in spec where wrong enterprise was being used --- spec/controllers/enterprises_controller_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/controllers/enterprises_controller_spec.rb b/spec/controllers/enterprises_controller_spec.rb index cf6f01cca8..58515e789b 100644 --- a/spec/controllers/enterprises_controller_spec.rb +++ b/spec/controllers/enterprises_controller_spec.rb @@ -95,7 +95,7 @@ describe EnterprisesController, type: :controller do describe "when an out of stock item is in the cart" do let(:variant) { create(:variant, on_demand: false, on_hand: 10) } let(:line_item) { create(:line_item, variant: variant) } - let(:order_cycle) { create(:simple_order_cycle, distributors: [distributor], variants: [variant]) } + let(:order_cycle) { create(:simple_order_cycle, distributors: [current_distributor], variants: [variant]) } before do order.set_distribution! current_distributor, order_cycle