From efcf71fd2b845d277955d274f6151605e7c14161 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Fri, 4 Jun 2021 17:26:49 +0100 Subject: [PATCH] Use OrderContents in cart spec test setups --- spec/features/consumer/shopping/cart_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/features/consumer/shopping/cart_spec.rb b/spec/features/consumer/shopping/cart_spec.rb index 9af20fa926..b34c45ac7f 100644 --- a/spec/features/consumer/shopping/cart_spec.rb +++ b/spec/features/consumer/shopping/cart_spec.rb @@ -164,7 +164,7 @@ feature "full-page cart", js: true do let(:variant2) { product_with_fee.variants.first } before do - add_product_to_cart order, product_with_tax + order.contents.add(product_with_tax.variants.first) end describe "when on_hand is zero but variant is on demand" do @@ -179,7 +179,7 @@ feature "full-page cart", js: true do describe "with insufficient stock available" do it "prevents user from entering invalid values" do - add_product_to_cart order, product_with_fee + order.contents.add(product_with_fee.variants.first) variant.update!(on_hand: 2, on_demand: false) variant2.update!(on_hand: 3, on_demand: false)