Bugzilla – Attachment 172289 Details for
Bug 37511
Add option to place the currency symbol before or after the amount
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37511: Unit tests
Bug-37511-Unit-tests.patch (text/plain), 1.66 KB, created by
Roman Dolny
on 2024-10-01 19:24:31 UTC
(
hide
)
Description:
Bug 37511: Unit tests
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2024-10-01 19:24:31 UTC
Size:
1.66 KB
patch
obsolete
>From 3bd974543483773cc464efa6ad5e445f26c93c1e Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Tue, 1 Oct 2024 13:29:02 +0000 >Subject: [PATCH] Bug 37511: Unit tests > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >--- > t/Number/Price.t | 29 ++++++++++++++++++++++++++++- > 1 file changed, 28 insertions(+), 1 deletion(-) > >diff --git a/t/Number/Price.t b/t/Number/Price.t >index 9017fe793e..d881750c17 100755 >--- a/t/Number/Price.t >+++ b/t/Number/Price.t >@@ -1,6 +1,6 @@ > use Modern::Perl; > >-use Test::More tests => 36; >+use Test::More tests => 37; > > use Test::MockModule; > use t::lib::Mocks; >@@ -152,3 +152,30 @@ subtest 'Changes for format' => sub { # See also bug 18736 > qr/\d\.\d{2}$/, 'This price still seems to be formatted' ); > # Note that the comparison with MAX_INT is already subject to rounding > }; >+ >+subtest 'Changes for default currency symbol position' => sub { >+ plan tests => 2; >+ >+ t::lib::Mocks::mock_preference( 'CurrencyFormat', 'FR' ); >+ $currency = Koha::Acquisition::Currency->new( >+ { >+ currency => 'PLN', >+ symbol => 'zÅ', >+ rate => 1, >+ active => 1, >+ p_sep_by_space => 1, >+ p_cs_precedes => 1, >+ } >+ ); >+ is( >+ Koha::Number::Price->new('123456.78')->format( { with_symbol => 1 } ), >+ 'zÅ 123 456,78', >+ 'PLN: format 123 456,78 with symbol before' >+ ); >+ $currency->p_cs_precedes(0); >+ is( >+ Koha::Number::Price->new('123456.78')->format( { with_symbol => 1 } ), >+ '123 456,78 zÅ', >+ 'PLN: format 123 456,78 with symbol after' >+ ); >+}; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37511
:
172264
|
172265
|
172266
|
172267
|
172286
|
172287
|
172288
|
172289
|
173551
|
173552
|
173553
|
173554
|
173555