Skip to content

Commit

Permalink
Fix distributor change spec in admin orders spec
Browse files Browse the repository at this point in the history
  • Loading branch information
luisramos0 committed Feb 4, 2019
1 parent c612df5 commit e5fdc89
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/features/admin/orders_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ def new_order_with_distribution(distributor, order_cycle)
scenario "displays error when incorrect distribution for products is chosen" do
d = create(:distributor_enterprise)
oc = create(:simple_order_cycle, distributors: [d])
puts d.name
puts @distributor.name

@order.state = 'cart'; @order.completed_at = nil; @order.save
# Moves the order back to the cart state
# A nil user keeps the order in the cart state
# Even if the edit page tries to automatically progress the order workflow
@order.state = 'cart'; @order.user = nil; @order.completed_at = nil; @order.save

quick_login_as_admin
visit '/admin/orders'
Expand Down

0 comments on commit e5fdc89

Please sign in to comment.