Bug 16441: Fix Letters.t
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 7 Jun 2016 10:48:46 +0000 (11:48 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 10 Jun 2016 16:41:28 +0000 (16:41 +0000)
These tests were wrong, but the package variable used to cache the
letters hid the problem.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
t/db_dependent/Letters.t

index ed5c972..c28f90f 100644 (file)
@@ -326,7 +326,7 @@ $prepared_letter = GetPreparedLetter((
     substitute             => $substitute,
     repeat                 => $repeat,
 ));
-is( $prepared_letter->{content}, q|This one only contains the date: | . output_pref({ dt => $date, dateonly => 1 }) . q|.|, 'dateonly test 2' );
+is( $prepared_letter->{content}, q|And also this one:| . output_pref({ dt => $date, dateonly => 1 }) . q|.|, 'dateonly test 2' );
 
 $dbh->do(q{UPDATE letter SET content = 'And also this one:<<timestamp|dateonly >>.' WHERE code = 'test_date';});
 $prepared_letter = GetPreparedLetter((
@@ -337,7 +337,7 @@ $prepared_letter = GetPreparedLetter((
     substitute             => $substitute,
     repeat                 => $repeat,
 ));
-is( $prepared_letter->{content}, q|This one only contains the date: | . output_pref({ dt => $date, dateonly => 1 }) . q|.|, 'dateonly test 3' );
+is( $prepared_letter->{content}, q|And also this one:| . output_pref({ dt => $date, dateonly => 1 }) . 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>');});