Update from code review

Co-authored-by: Gaetan Craig-Riou <40413322+rioug@users.noreply.github.com>
This commit is contained in:
David Cook
2025-05-05 12:04:53 +10:00
parent ff9e2a33ce
commit eadfa8c965

View File

@@ -249,8 +249,9 @@ RSpec.describe "Product Import" do
File.write('/tmp/test.csv', csv_data)
# setting a variant to have negative stock, with the on demand option set to true
Spree::Product.find_by(name: 'Cabbage').variants.first.on_demand = true
Spree::Product.find_by(name: 'Cabbage').variants.first.on_hand = -30
cabbage_variant = Spree::Product.find_by(name: 'Cabbage').variants.first
cabbage_variant.on_demand = true
cabbage_variant.on_hand = -30
visit main_app.admin_product_import_path