mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
refactor and bugfix for tests
This commit is contained in:
@@ -3,12 +3,13 @@ describe 'convert number to localised currency ', ->
|
||||
|
||||
beforeEach ->
|
||||
currencyconfig =
|
||||
currency: "D"
|
||||
symbol: "$"
|
||||
symbol_position: "before"
|
||||
currency: "D"
|
||||
hide_cents: "false"
|
||||
decimal_mark: "."
|
||||
thousands_separator: ","
|
||||
# Not used yet...
|
||||
# decimal_mark: "."
|
||||
# thousands_separator: ","
|
||||
module 'Darkswarm'
|
||||
module ($provide)->
|
||||
$provide.value "currencyConfig", currencyconfig
|
||||
@@ -34,4 +35,8 @@ describe 'convert number to localised currency ', ->
|
||||
currencyconfig.display_currency = "true"
|
||||
expect(filter(5)).toEqual "$5.00 D"
|
||||
|
||||
it "can hide cents", ->
|
||||
currencyconfig.hide_cents = "true"
|
||||
expect(filter(5)).toEqual "$5"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user