Lines 18-24
Link Here
|
18 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
18 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
use Test::More tests => 83; |
21 |
use Test::More tests => 84; |
22 |
use Test::MockModule; |
22 |
use Test::MockModule; |
23 |
use Test::Warn; |
23 |
use Test::Warn; |
24 |
use Test::Exception; |
24 |
use Test::Exception; |
Lines 279-284
$prepared_letter = GetPreparedLetter((
Link Here
|
279 |
$my_content_letter = qq|This is a SMS for an $substitute->{status}|; |
279 |
$my_content_letter = qq|This is a SMS for an $substitute->{status}|; |
280 |
is( $prepared_letter->{content}, $my_content_letter, 'GetPreparedLetter returns the content correctly' ); |
280 |
is( $prepared_letter->{content}, $my_content_letter, 'GetPreparedLetter returns the content correctly' ); |
281 |
|
281 |
|
|
|
282 |
$prepared_letter = GetPreparedLetter(( |
283 |
module => 'my module', |
284 |
branchcode => $library->{branchcode}, |
285 |
letter_code => 'my code', |
286 |
tables => $tables, |
287 |
substitute => { status => undef }, |
288 |
repeat => $repeat, |
289 |
message_transport_type => 'sms', |
290 |
)); |
291 |
is( $prepared_letter->{content}, q|This is a SMS for an |, 'GetPreparedLetter returns the content correctly when substitute contains undefined value' ); |
292 |
|
282 |
$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>>.');}); |
293 |
$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>>.');}); |
283 |
$prepared_letter = GetPreparedLetter(( |
294 |
$prepared_letter = GetPreparedLetter(( |
284 |
module => 'test_date', |
295 |
module => 'test_date', |
285 |
- |
|
|