adding session token to order test

This commit is contained in:
Will Marshall
2014-05-21 10:46:03 +10:00
parent c1a55de40e
commit 391b1da04c
2 changed files with 2 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ Spree::OrdersController.class_eval do
end
populator = Spree::OrderPopulator.new(current_order(true), current_currency)
if populator.populate(params.slice(:products, :variants, :quantity))
fire_event('spree.cart.add')
fire_event('spree.order.contents_changed')
respond_with(@order) do |format|

View File

@@ -15,6 +15,7 @@ describe Spree::OrdersController do
controller.stub(:current_order_cycle).and_return(order_cycle)
controller.stub(:current_order).and_return order
order.stub_chain(:line_items, :empty?).and_return true
session[:access_token] = order.token
spree_get :edit
response.should redirect_to shop_path
end