Bugzilla – Attachment 52121 Details for
Bug 16624
Times are formatted incorrectly in slips ( AM PM ) due to double processing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16624: Add regression tests
Bug-16624-Add-regression-tests.patch (text/plain), 2.75 KB, created by
Jonathan Druart
on 2016-06-07 11:06:48 UTC
(
hide
)
Description:
Bug 16624: Add regression tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-06-07 11:06:48 UTC
Size:
2.75 KB
patch
obsolete
>From be90583bd9530c8269c635509cbd540ca570d7a0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 7 Jun 2016 12:00:59 +0100 >Subject: [PATCH] Bug 16624: Add regression tests > >--- > t/db_dependent/Letters.t | 18 ++++++++++++++++-- > 1 file changed, 16 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index c28f90f..a78dcde 100644 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -18,7 +18,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More tests => 72; >+use Test::More tests => 73; > use Test::MockModule; > use Test::Warn; > >@@ -306,7 +306,7 @@ $prepared_letter = GetPreparedLetter(( > $my_content_letter = qq|This is a SMS for an $substitute->{status}|; > is( $prepared_letter->{content}, $my_content_letter, 'GetPreparedLetter returns the content correctly' ); > >-$dbh->do(q{INSERT INTO letter (module, code, name, title, content) VALUES ('test_date','TEST_DATE','Test dates','Test dates','This one only contains the date: <<biblio.timestamp | dateonly>>.');}); >+$dbh->do(q{INSERT INTO letter (module, code, name, title, content) VALUES ('test_date','TEST_DATE','Test dates','A title with a timestamp: <<biblio.timestamp>>','This one only contains the date: <<biblio.timestamp | dateonly>>.');}); > $prepared_letter = GetPreparedLetter(( > module => 'test_date', > branchcode => '', >@@ -339,6 +339,20 @@ $prepared_letter = GetPreparedLetter(( > )); > is( $prepared_letter->{content}, q|And also this one:| . output_pref({ dt => $date, dateonly => 1 }) . q|.|, 'dateonly test 3' ); > >+t::lib::Mocks::mock_preference( 'TimeFormat', '12hr' ); >+my $yesterday_night = $date->clone->add( days => -1 )->set_hour(22); >+$dbh->do(q|UPDATE biblio SET timestamp = ? WHERE biblionumber = ?|, undef, $yesterday_night, $biblionumber ); >+$dbh->do(q{UPDATE letter SET content = 'And also this one:<<timestamp>>.' WHERE code = 'test_date';}); >+$prepared_letter = GetPreparedLetter(( >+ module => 'test_date', >+ branchcode => '', >+ letter_code => 'test_date', >+ tables => $tables, >+ substitute => $substitute, >+ repeat => $repeat, >+)); >+is( $prepared_letter->{content}, q|And also this one:| . output_pref({ dt => $yesterday_night }) . q|.|, 'dateonly test 3' ); >+ > $dbh->do(q{INSERT INTO letter (module, code, name, title, content) VALUES ('claimacquisition','TESTACQCLAIM','Acquisition Claim','Item Not Received','<<aqbooksellers.name>>|<<aqcontacts.name>>|<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> ordered)</order>');}); > > # Test that _parseletter doesn't modify its parameters bug 15429 >-- >2.8.1
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 16624
:
51934
|
51937
|
52121
|
52122
|
52126
|
52127
|
52453
|
52546
|
52547