Switch to class case for OptionValueNamer

This commit is contained in:
Rohan Mitchell
2014-07-18 10:06:13 +10:00
parent 91e4f24fde
commit 6c59ffc16f
6 changed files with 19 additions and 19 deletions

View File

@@ -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'