Skip to content

Commit

Permalink
Fix specs to reflect changes in core
Browse files Browse the repository at this point in the history
As done in the main repository, there are some changes
needed in the specs after some changes happened in the
StockQuantifier.

See solidusio/solidus#4291 for more information.
  • Loading branch information
kennyadsl committed Apr 22, 2022
1 parent 0b6137e commit e646972
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

let(:order) { Spree::TestingSupport::OrderWalkthrough.up_to(:payment) }
let(:order_product) { order.products.first }
let(:order_stock_item) { order_product.stock_items.first }
let(:order_stock_item) { order.line_items.first.variant.stock_items.first }

before do
order_stock_item.update! backorderable: false
Expand All @@ -25,6 +25,7 @@
before do
visit spree.checkout_state_path(:confirm)
order_stock_item.set_count_on_hand(0)
order.line_items.first.variant.stock_items.reload
end

it 'redirects to cart page and shows an unavailable product message' do
Expand All @@ -44,6 +45,7 @@
before do
visit spree.checkout_state_path(:confirm)
order_stock_item.set_count_on_hand(0)
order.line_items.first.variant.stock_items.reload
end

it "redirects to the address checkout page and shows an availability changed message" do
Expand Down

0 comments on commit e646972

Please sign in to comment.