Patching some deadlocks

This commit is contained in:
Will Marshall
2014-05-01 17:21:46 +10:00
parent 59d2bc908e
commit 2d536e01e7
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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