Per review, check value are saved in the database

This commit is contained in:
Gaetan Craig-Riou
2024-08-26 16:32:47 +10:00
parent ce0c7929a7
commit 04e14bf38b

View File

@@ -33,6 +33,14 @@ RSpec.describe '
# Then the variant should have been created
expect(page).to have_content "Variant \"#{product.name}\" has been successfully created!"
new_variant = Spree::Variant.last
expect(new_variant.unit_value).to eq(1)
expect(new_variant.variant_unit).to eq("volume")
expect(new_variant.variant_unit_scale).to eq(1) # Liter
expect(new_variant.price).to eq(2.5)
expect(new_variant.primary_taxon).to eq(taxon)
expect(new_variant.supplier).to eq(product.variants.first.supplier)
end
it "creating a new variant from product variant page with filter" do