spree/spree — pull request #3576 by petergoldstein (2013-08-16 22:19:54+00:00)
Title: Fix broken page display in item transfer from one shipment to another

When a shipment is split, and an item is transferred from one shipment to another, there are two AJAX calls. The first removes the item from the original shipment, while the second adds the item to the target shipment (potentially creating a new shipment in the process).

Currently the page reloads after the first of these AJAX calls, not after the second. This means that the transferred item 'disappears' from the page, and is not displayed in the target shipment. If the target shipment is new, then the shipment doesn't appear on the page either.

Shifting the page reload to the 'done' method of the second request resolves this issue. There was already a failing test covering this, and resolution of this issue makes this test green.

Also removed an extraneous create(:stock_location, name: "LA") from the spec, as the one in the let! was getting invoked already.