From 887d52e1488b3b2f83e6831d3b1c11f4a3aeb56b Mon Sep 17 00:00:00 2001 From: Kip Cole Date: Tue, 14 Dec 2021 09:50:38 +1100 Subject: [PATCH] Add additonal decimal short format tests --- test/number/number_format_test.exs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/number/number_format_test.exs b/test/number/number_format_test.exs index 7dc19ce..1d00779 100644 --- a/test/number/number_format_test.exs +++ b/test/number/number_format_test.exs @@ -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