set completed_at

This commit is contained in:
Bounmy Stephane 2012-05-25 21:26:19 +02:00
parent 4b1def8643
commit 3d5af5bdaf
2 changed files with 3 additions and 1 deletions

View File

@ -147,7 +147,8 @@ module Spree
Rails.logger.error ppx_auth_response.to_yaml
end
@order.update_attribute(:state, "complete")
@order.update_attributes({:state => "complete", :completed_at => Time.now}, :without_protection => true)
state_callback(:after) # So that after_complete is called, setting session[:order_id] to nil
# Since we dont rely on state machine callback, we just explicitly call this method for spree_store_credits

View File

@ -97,6 +97,7 @@ module Spree
order.reload
order.state.should == "complete"
order.completed_at.should_not be_nil
order.payments.size.should == 1
order.payment_state.should == "paid"
end