From 3ecb5c0c75bbc358b2552e843ae150f701a456ea Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Sun, 18 Aug 2019 18:16:28 +1000 Subject: [PATCH] Flush background jobs in failing spec --- spec/features/consumer/shopping/checkout_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/features/consumer/shopping/checkout_spec.rb b/spec/features/consumer/shopping/checkout_spec.rb index a0561c062f..5b1ecfc50f 100644 --- a/spec/features/consumer/shopping/checkout_spec.rb +++ b/spec/features/consumer/shopping/checkout_spec.rb @@ -194,6 +194,7 @@ feature "As a consumer I want to check out my cart", js: true do it "does not show item after all stock of an item is checked out (tesging cache update on checkout)" do Spree::Config[:enable_products_cache?] = true variant.update_attributes on_hand: 5 + flush_jobs visit shop_path fill_in "variants[#{variant.id}]", with: '5' @@ -210,6 +211,7 @@ feature "As a consumer I want to check out my cart", js: true do place_order expect(page).to have_content "Your order has been processed successfully" + flush_jobs visit shop_path # The presence of the control product ensures the list of products is fully loaded # before we verify the sold product is not present