From aac47d3b517a819cad0c5ef6190142979665ba02 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Thu, 28 Aug 2014 18:45:27 +0200 Subject: [PATCH] end of day commit --- .../user/app/controllers/product_orders_controller.js.coffee | 3 +-- spec/acceptance_steps/users/changing_table_steps.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/user/app/controllers/product_orders_controller.js.coffee b/app/assets/javascripts/user/app/controllers/product_orders_controller.js.coffee index c22af117..28281c12 100644 --- a/app/assets/javascripts/user/app/controllers/product_orders_controller.js.coffee +++ b/app/assets/javascripts/user/app/controllers/product_orders_controller.js.coffee @@ -19,7 +19,7 @@ App.ProductOrdersController = Ember.ArrayController.extend #error = @ajaxError (jqXHR)=> #new_product_orders.invoke 'eraseRecord' #@redirect_to 'index', message: 'order_could_not_be_processed' - + order.save().then (response)=> new_product_orders.invoke 'eraseRecord' if @get('controllers.application.list') @@ -29,7 +29,6 @@ App.ProductOrdersController = Ember.ArrayController.extend @get('controllers.application').setCurrentList -> @transitionToRoute 'active_list' , @ajaxError (jqXHR)=> - debugger new_product_orders.invoke 'eraseRecord' @redirect_to 'index', message: 'order_could_not_be_processed' #orders = @store.all('product_order').toArray() diff --git a/spec/acceptance_steps/users/changing_table_steps.rb b/spec/acceptance_steps/users/changing_table_steps.rb index 5dadcfbc..b57e96d0 100644 --- a/spec/acceptance_steps/users/changing_table_steps.rb +++ b/spec/acceptance_steps/users/changing_table_steps.rb @@ -16,7 +16,7 @@ end step "the user should see the supplier menu having the other table as base" do #route_should_be 'user#list_products' page.should have_content 'Apple pie' - find('.table-number').text.should == "Tafel #{@other_table.number.to_s}" + all('.table-number').map(&:text).uniq.should == ["# #{@other_table.number.to_s}"] end step "the user list should have been moved to the other table" do