mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #9659 from saunmanoj888/fix-bulk-product-update-unit-value
Allow to change unit value for numbers with a comma separator on bulk product update
This commit is contained in:
@@ -667,6 +667,15 @@ describe "AdminProductEditCtrl", ->
|
||||
unit_description: ''
|
||||
unit_value_with_description: "12"
|
||||
|
||||
it "converts unit_value into a float when a comma separated number is provided", ->
|
||||
testProduct = {id: 123, variant_unit_scale: 1.0}
|
||||
testVariant = {unit_value_with_description: "250,5"}
|
||||
$scope.packVariant(testProduct, testVariant)
|
||||
expect(testVariant).toEqual
|
||||
unit_value: 250.5
|
||||
unit_description: ''
|
||||
unit_value_with_description: "250,5"
|
||||
|
||||
|
||||
describe "filtering products", ->
|
||||
beforeEach ->
|
||||
|
||||
Reference in New Issue
Block a user