Skip to content

Commit

Permalink
Move Icelandic symbol after the amount (RubyMoney#929)
Browse files Browse the repository at this point in the history
* Move Icelandic symbol after the digits

* Update tests for ISK. Move unit from front to back

kr300 -> 300 kr.
  • Loading branch information
viktorsmari authored May 10, 2020
1 parent 2efd45f commit 265de50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/currency_iso.json
Original file line number Diff line number Diff line change
Expand Up @@ -1019,11 +1019,11 @@
"priority": 100,
"iso_code": "ISK",
"name": "Icelandic Króna",
"symbol": "kr",
"symbol": "kr.",
"alternate_symbols": ["Íkr"],
"subunit": null,
"subunit_to_unit": 1,
"symbol_first": true,
"symbol_first": false,
"html_entity": "",
"decimal_mark": ",",
"thousands_separator": ".",
Expand Down
4 changes: 2 additions & 2 deletions spec/money/formatting_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@

context "with overridden i18n settings" do
it "should respect explicit overriding of thousands_separator/delimiter when decimal_mark/separator collide and there’s no decimal component for currencies that have no subunit" do
expect(Money.new(300_000, 'ISK').format(thousands_separator: ".", decimal_mark: ',')).to eq "kr300.000"
expect(Money.new(300_000, 'ISK').format(thousands_separator: ".", decimal_mark: ',')).to eq "300.000 kr."
end

it "should respect explicit overriding of thousands_separator/delimiter when decimal_mark/separator collide and there’s no decimal component for currencies with subunits that drop_trailing_zeros" do
Expand Down Expand Up @@ -474,7 +474,7 @@
before { Money.use_i18n = false }

it "should respect explicit overriding of thousands_separator/delimiter when decimal_mark/separator collide and there’s no decimal component for currencies that have no subunit" do
expect(Money.new(300_000, 'ISK').format(thousands_separator: ",", decimal_mark: '.')).to eq "kr300,000"
expect(Money.new(300_000, 'ISK').format(thousands_separator: ",", decimal_mark: '.')).to eq "300,000 kr."
end

it "should respect explicit overriding of thousands_separator/delimiter when decimal_mark/separator collide and there’s no decimal component for currencies with subunits that drop_trailing_zeros" do
Expand Down

0 comments on commit 265de50

Please sign in to comment.