mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
Change KL to kL, update specs for ML to kL change
This commit is contained in:
@@ -87,7 +87,7 @@ describe "Option Value Namer", ->
|
||||
expect(namer.option_value_value_unit()).toEqual [100, unit]
|
||||
|
||||
it "generates values for all volume scales", ->
|
||||
for units in [[0.001, 'mL'], [1.0, 'L'], [1000000.0, 'ML']]
|
||||
for units in [[0.001, 'mL'], [1.0, 'L'], [1000.0, 'kL']]
|
||||
[scale, unit] = units
|
||||
p.variant_unit = 'volume'
|
||||
p.variant_unit_scale = scale
|
||||
|
||||
@@ -352,7 +352,7 @@ describe "AdminOrderMgmtCtrl", ->
|
||||
expect(scope.getScale(1.2,"weight")).toEqual 1.0
|
||||
expect(scope.getScale(1000,"weight")).toEqual 1000.0
|
||||
expect(scope.getScale(0.0012,"volume")).toEqual 0.001
|
||||
expect(scope.getScale(1001,"volume")).toEqual 1.0
|
||||
expect(scope.getScale(1001,"volume")).toEqual 1000.0
|
||||
|
||||
it "returns the smallest unit available when value is smaller", ->
|
||||
expect(scope.getScale(0.4,"weight")).toEqual 1
|
||||
@@ -365,7 +365,7 @@ describe "AdminOrderMgmtCtrl", ->
|
||||
expect(scope.getUnitName(1000000,"weight")).toEqual "T"
|
||||
expect(scope.getUnitName(0.001,"volume")).toEqual "mL"
|
||||
expect(scope.getUnitName(1,"volume")).toEqual "L"
|
||||
expect(scope.getUnitName(1000000,"volume")).toEqual "ML"
|
||||
expect(scope.getUnitName(1000,"volume")).toEqual "kL"
|
||||
|
||||
describe "managing pending changes", ->
|
||||
dataSubmitter = pendingChangesService = null
|
||||
|
||||
Reference in New Issue
Block a user