From dbe19779caa8814e1aafc61bec98f285019aaf7e Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Fri, 5 Sep 2014 10:50:10 +0200 Subject: [PATCH] Add failing user spec when loading previous lists --- spec/acceptance/users/order_a_product.feature | 1 + spec/acceptance_steps/users/order_products_steps.rb | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/spec/acceptance/users/order_a_product.feature b/spec/acceptance/users/order_a_product.feature index 5b75f7ad..7bd15f47 100644 --- a/spec/acceptance/users/order_a_product.feature +++ b/spec/acceptance/users/order_a_product.feature @@ -45,6 +45,7 @@ Feature: Ordering a product as a user Scenario: Loading lists and switching to the order products view works, lists loading may unlink active list orders Given There is an open supplier with a menu And there is a signed in user with an active order + And the user has an older list for the same supplier And I wait 1 second And the user is on the order products page When the user opens the side menu diff --git a/spec/acceptance_steps/users/order_products_steps.rb b/spec/acceptance_steps/users/order_products_steps.rb index 99f0a336..76110db7 100644 --- a/spec/acceptance_steps/users/order_products_steps.rb +++ b/spec/acceptance_steps/users/order_products_steps.rb @@ -105,3 +105,9 @@ step 'the user should see the products listed for the active list' do page.should have_content @heineken_beer.name page.should have_content @apple_pie.name end + +step "the user has an older list for the same supplier" do + expect([@supplier, @table, @user]).to be_all + @older_list = create :list, supplier: @supplier, table: @table, user_ids: [@user.id] + +end