Bugzilla – Attachment 84965 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.51 KB, created by
Kyle M Hall (khall)
on 2019-02-11 12:15:35 UTC
(
hide
)
Description:
Bug 21829: Add tests for dateexpiry format in notices
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-02-11 12:15:35 UTC
Size:
1.51 KB
patch
obsolete
>From 6dc3cceaa180243e941813c5f375588742050536 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 > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > 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 f758bbc9be..09e35e3312 100644 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -354,6 +354,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.17.2 (Apple Git-113)
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