mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-10 23:07:47 +00:00
Factorize Unit Price into a single method: displayableUnitPrice
- Code is at a single place - No need to import `localizeCurrencyFilter` into Controllers that required unit_prices - Add `currencyconfig` into unit_prices_spec as it's now dependant to localizeCurrencyFilter
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
describe "UnitPrices service", ->
|
||||
UnitPrices = null
|
||||
currencyconfig =
|
||||
symbol: "$"
|
||||
symbol_position: "before"
|
||||
currency: "D"
|
||||
hide_cents: "false"
|
||||
|
||||
beforeEach ->
|
||||
module "admin.products"
|
||||
module ($provide)->
|
||||
$provide.value "availableUnits", "g,kg,T,mL,L,kL,oz,lb"
|
||||
$provide.value "currencyConfig", currencyconfig
|
||||
null
|
||||
inject (_UnitPrices_) ->
|
||||
UnitPrices = _UnitPrices_
|
||||
|
||||
Reference in New Issue
Block a user