Skip to content

Commit

Permalink
Add additonal decimal short format tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Dec 13, 2021
1 parent 698f159 commit 887d52e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/number/number_format_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,7 @@ defmodule Number.Format.Test do
test "Decimal currency short formatging" do
assert MyApp.Cldr.Number.to_string(Decimal.new(1_000_000), format: :currency_short) == {:ok, "$1M"}
assert MyApp.Cldr.Number.to_string(Decimal.new(1_100_000), format: :currency_short, fractional_digits: 1) == {:ok, "$1.1M"}
assert MyApp.Cldr.Number.to_string(Decimal.new(1_000_000), format: :short) == {:ok, "1M"}
assert MyApp.Cldr.Number.to_string(Decimal.new(1_100_000), format: :short, fractional_digits: 1) == {:ok, "1.1M"}
end
end

0 comments on commit 887d52e

Please sign in to comment.