mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
Fix bug: Unselecting product variant unit in BPE doesn't save
This commit is contained in:
@@ -690,6 +690,21 @@ describe "AdminProductEditCtrl", ->
|
||||
variant_unit_scale: 1000
|
||||
variant_unit_with_scale: 'volume_1000'
|
||||
|
||||
it "extracts a null value into null variant_unit and variant_unit_scale", ->
|
||||
testProduct =
|
||||
id: 1
|
||||
variant_unit: 'weight'
|
||||
variant_unit_scale: 1
|
||||
variant_unit_with_scale: null
|
||||
|
||||
scope.packProduct(testProduct)
|
||||
|
||||
expect(testProduct).toEqual
|
||||
id: 1
|
||||
variant_unit: null
|
||||
variant_unit_scale: null
|
||||
variant_unit_with_scale: null
|
||||
|
||||
it "extracts when variant_unit_with_scale is 'items'", ->
|
||||
testProduct =
|
||||
id: 1
|
||||
|
||||
Reference in New Issue
Block a user