Bug 15770: Do not format numbers if too big
[koha-ffzg.git] / t / Number / Price.t
index 68365c3..ea58488 100644 (file)
@@ -1,6 +1,6 @@
 use Modern::Perl;
 
-use Test::More tests => 30;
+use Test::More tests => 31;
 
 use Test::MockModule;
 use t::lib::Mocks;
@@ -33,6 +33,8 @@ is( Koha::Number::Price->new(3)->format( $format ), '3.00', 'US: format 3' );
 is( Koha::Number::Price->new(1234567890)->format( $format ),
     '1,234,567,890.00', 'US: format 1234567890' );
 
+is( Koha::Number::Price->new(100000000000000)->format, '100000000000000', 'Numbers too big are not formatted');
+
 # FIXME This should be display symbol, but it was the case before the creation of this module
 is( Koha::Number::Price->new->format( { %$format, with_symbol => 1 } ),
     '0.00', 'US: format 0 with symbol' );