From 6c5f1feec4a232ba2acc97d143d5e47893e60930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 16 May 2022 12:46:56 +0200 Subject: [PATCH] fix test name --- tests/Pest/FormattingTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Pest/FormattingTest.php b/tests/Pest/FormattingTest.php index 80e9143..ce390dd 100644 --- a/tests/Pest/FormattingTest.php +++ b/tests/Pest/FormattingTest.php @@ -47,11 +47,13 @@ test('the format method accepts overrides', function () { expect(Money::fromDecimal(10.45)->formatted(decimalSeparator: ',', suffix: ' USD'))->toBe('$10,45 USD'); }); -test('the trailing decimal zeros trimming', function () { +test('decimal zeros can be trimmed', function () { + // SEK uses decimal zero trimming expect(Money::fromDecimal(10.00, SEK::class)->formatted())->toBe('10 kr'); expect(Money::fromDecimal(10.10, SEK::class)->formatted())->toBe('10.1 kr'); expect(Money::fromDecimal(10.12, SEK::class)->formatted())->toBe('10.12 kr'); + // EUR does not use decimal zero trimming expect(Money::fromDecimal(10.00, EUR::class)->formatted())->toBe('10.00 €'); expect(Money::fromDecimal(10.10, EUR::class)->formatted())->toBe('10.10 €'); expect(Money::fromDecimal(10.12, EUR::class)->formatted())->toBe('10.12 €');