Fix ship method when advancing subscription order

This commit is contained in:
Kristina Lim
2019-08-22 21:32:37 +08:00
parent ff634bd870
commit 5b68b2f707
2 changed files with 2 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ class SubscriptionPlacementJob
end
def move_to_completion(order)
until order.completed? do order.next! end
AdvanceOrderService.new(order).call!
end
def unavailable_stock_lines_for(order)

View File

@@ -155,7 +155,7 @@ describe SubscriptionPlacementJob do
create(:subscription, shop: shop, shipping_method: shipping_method, with_items: true)
end
pending "uses the same shipping method after advancing the order" do
it "uses the same shipping method after advancing the order" do
job.send(:process, order)
expect(order.state).to eq "complete"
order.reload