Skip to content

Commit

Permalink
Merge pull request #1772 from solidusio/fix-shipped-order-factory
Browse files Browse the repository at this point in the history
Fix shipped_order factory
  • Loading branch information
jhawthorn authored Mar 15, 2017
2 parents 46e2843 + 1a556fb commit 3c1c9e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions core/lib/spree/testing_support/factories/order_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
shipped_at: Time.current
)
end
# We need to update the shipment_state after all callbacks have run
order.update_columns(shipment_state: 'shipped')
order.reload
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@
expect(order).to have_attributes(
total: 110,
payment_total: 110,
payment_state: "paid"
payment_state: "paid",
shipment_state: "shipped"
)

expect(order.payments.count).to eq 1
Expand Down

0 comments on commit 3c1c9e8

Please sign in to comment.