mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-02 02:11:33 +00:00
Switch to class case for OptionValueNamer
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
describe "Option Value Namer", ->
|
||||
optionValueNamer = null
|
||||
OptionValueNamer = null
|
||||
|
||||
beforeEach ->
|
||||
module "ofn.admin"
|
||||
|
||||
beforeEach inject (_optionValueNamer_) ->
|
||||
optionValueNamer = _optionValueNamer_
|
||||
beforeEach inject (_OptionValueNamer_) ->
|
||||
OptionValueNamer = _OptionValueNamer_
|
||||
|
||||
describe "generating option value name", ->
|
||||
v = namer = null
|
||||
beforeEach ->
|
||||
v = {}
|
||||
namer = new optionValueNamer(v)
|
||||
namer = new OptionValueNamer(v)
|
||||
|
||||
it "when description is blank", ->
|
||||
v.unit_description = null
|
||||
@@ -43,7 +43,7 @@ describe "Option Value Namer", ->
|
||||
beforeEach ->
|
||||
p = {}
|
||||
v = { product: p }
|
||||
namer = new optionValueNamer(v)
|
||||
namer = new OptionValueNamer(v)
|
||||
|
||||
it "returns true when the product has a scale", ->
|
||||
p.variant_unit_scale = 1000
|
||||
@@ -58,7 +58,7 @@ describe "Option Value Namer", ->
|
||||
beforeEach ->
|
||||
p = {}
|
||||
v = { product: p }
|
||||
namer = new optionValueNamer(v)
|
||||
namer = new OptionValueNamer(v)
|
||||
|
||||
it "generates simple values", ->
|
||||
p.variant_unit = 'weight'
|
||||
|
||||
Reference in New Issue
Block a user