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 €');