|
Lines 20-26
Link Here
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
|
21 |
|
| 22 |
use Test::NoWarnings; |
22 |
use Test::NoWarnings; |
| 23 |
use Test::More tests => 4; |
23 |
use Test::More tests => 5; |
| 24 |
|
24 |
|
| 25 |
use C4::Letters qw( GetPreparedLetter EnqueueLetter ); |
25 |
use C4::Letters qw( GetPreparedLetter EnqueueLetter ); |
| 26 |
|
26 |
|
|
Lines 366-369
subtest 'stylesheets() tests' => sub {
Link Here
|
| 366 |
$schema->storage->txn_rollback; |
366 |
$schema->storage->txn_rollback; |
| 367 |
}; |
367 |
}; |
| 368 |
|
368 |
|
|
|
369 |
subtest 'patron() tests' => sub { |
| 370 |
|
| 371 |
plan tests => 2; |
| 372 |
|
| 373 |
$schema->storage->txn_begin; |
| 374 |
|
| 375 |
my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); |
| 376 |
my $message = $builder->build_object( |
| 377 |
{ |
| 378 |
class => 'Koha::Notice::Messages', |
| 379 |
value => { borrowernumber => $patron->borrowernumber } |
| 380 |
} |
| 381 |
); |
| 382 |
|
| 383 |
is( ref( $message->patron ), 'Koha::Patron', 'Object type is correct' ); |
| 384 |
is( $message->patron->borrowernumber, $patron->borrowernumber, 'Right patron linked' ); |
| 385 |
|
| 386 |
$schema->storage->txn_rollback; |
| 387 |
}; |
| 388 |
|
| 369 |
1; |
389 |
1; |
| 370 |
- |
|
|