From 5729047e10f33c91b82ade006e26d75b3287483b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 23 Apr 2018 12:03:48 -0300 Subject: [PATCH] Bug 20625: Add tests Signed-off-by: Mark Tompsett --- t/Number/Price.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/Number/Price.t b/t/Number/Price.t index d7d143ad01..6eed734443 100644 --- a/t/Number/Price.t +++ b/t/Number/Price.t @@ -1,6 +1,6 @@ use Modern::Perl; -use Test::More tests => 32; +use Test::More tests => 33; use Test::MockModule; use t::lib::Mocks; @@ -19,6 +19,9 @@ my $orig_locale = setlocale(LC_NUMERIC); my $format = { p_cs_precedes => 1, # Force to place the symbol at the beginning }; + +is( Koha::Number::Price->new->format( $format ), '0.00', 'There is no currency defined yet, do not explode!' ); + t::lib::Mocks::mock_preference( 'CurrencyFormat', 'US' ); $currency = Koha::Acquisition::Currency->new({ currency => 'USD', -- 2.14.1