From 04e14bf38b9428117b851bf1c7eecf318d30708e Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 26 Aug 2024 16:32:47 +1000 Subject: [PATCH] Per review, check value are saved in the database --- spec/system/admin/variants_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/system/admin/variants_spec.rb b/spec/system/admin/variants_spec.rb index 79a49cbccd..2f6280f778 100644 --- a/spec/system/admin/variants_spec.rb +++ b/spec/system/admin/variants_spec.rb @@ -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