Bugzilla – Attachment 82329 Details for
Bug 21829
Date displays as a datetime in notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21829: Add tests for dateexpiry format in notices
Bug-21829-Add-tests-for-dateexpiry-format-in-notic.patch (text/plain), 1.44 KB, created by
Jonathan Druart
on 2018-11-14 12:39:31 UTC
(
hide
)
Description:
Bug 21829: Add tests for dateexpiry format in notices
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-11-14 12:39:31 UTC
Size:
1.44 KB
patch
obsolete
>From ec75cf171fc59abd5116e41af324fe9d188eea02 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 14 Nov 2018 09:37:58 -0300 >Subject: [PATCH] Bug 21829: Add tests for dateexpiry format in notices > >--- > t/db_dependent/Letters.t | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index 84fbaacb67..ec0415517d 100644 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -399,6 +399,21 @@ $dbh->do(q{INSERT INTO letter (module, code, name, title, content) VALUES ('orde > is( $values->{dateexpiry}, '2015-12-13', "_parseletter doesn't modify its parameters" ); > } > >+# Correctly format dateexpiry >+{ >+ my $values = { dateexpiry => '2015-12-13', }; >+ >+ t::lib::Mocks::mock_preference('dateformat', 'metric'); >+ t::lib::Mocks::mock_preference('timeformat', '24hr'); >+ my $letter = C4::Letters::_parseletter({ content => "expiry on <<borrowers.dateexpiry>>"}, 'borrowers', $values); >+ is( $letter->{content}, 'expiry on 13/12/2015' ); >+ >+ t::lib::Mocks::mock_preference('dateformat', 'metric'); >+ t::lib::Mocks::mock_preference('timeformat', '12hr'); >+ $letter = C4::Letters::_parseletter({ content => "expiry on <<borrowers.dateexpiry>>"}, 'borrowers', $values); >+ is( $letter->{content}, 'expiry on 13/12/2015' ); >+} >+ > my $bookseller = Koha::Acquisition::Bookseller->new( > { > name => "my vendor", >-- >2.11.0
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 21829
:
82329
|
82330
|
84965
|
84966
|
84967