mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-20 00:37:26 +00:00
Merge pull request #13027 from chahmedejaz/bugfix/13026-reset-variant-unit-name
Changing a variant unit scale from items to weight/volume does not remove variant unit name
This commit is contained in:
@@ -987,11 +987,11 @@ RSpec.describe Spree::Variant do
|
||||
|
||||
variant.variant_unit = 'weight'
|
||||
variant.variant_unit_scale = 1
|
||||
variant.variant_unit_name = 'g'
|
||||
variant.save!
|
||||
|
||||
expect(variant.variant_unit).to eq 'weight'
|
||||
expect(variant.unit_presentation).to eq "1g"
|
||||
expect(variant.variant_unit_name).to eq('')
|
||||
|
||||
variant.update(variant_unit: 'volume')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user