From 2d536e01e76e07b324316d6e2cf55e11326339f8 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Thu, 1 May 2014 17:21:46 +1000 Subject: [PATCH] Patching some deadlocks --- app/controllers/shop/shop_controller.rb | 2 +- spec/features/consumer/shopping/shopping_spec.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/shop/shop_controller.rb b/app/controllers/shop/shop_controller.rb index 5ee8cdb19f..d06b521e9b 100644 --- a/app/controllers/shop/shop_controller.rb +++ b/app/controllers/shop/shop_controller.rb @@ -1,7 +1,7 @@ class Shop::ShopController < BaseController layout "darkswarm" before_filter :require_distributor_chosen - before_filter :set_order_cycles + before_filter :set_order_cycles, only: :show def show end diff --git a/spec/features/consumer/shopping/shopping_spec.rb b/spec/features/consumer/shopping/shopping_spec.rb index 8c72e209e9..861351a635 100644 --- a/spec/features/consumer/shopping/shopping_spec.rb +++ b/spec/features/consumer/shopping/shopping_spec.rb @@ -60,8 +60,9 @@ feature "As a consumer I want to shop with a distributor", js: true do end it "shows the table after an order cycle is selected" do - order.update_attribute(:order_cycle, oc1) visit shop_path + select "frogs", :from => "order_cycle_id" + page.should have_content distributor.name # This forces a wait, allowing the Ajax call to finish page.should have_selector("input.button.right", visible: true) end