|
Lines 386-391
subtest 'patron() tests' => sub {
Link Here
|
| 386 |
$schema->storage->txn_rollback; |
386 |
$schema->storage->txn_rollback; |
| 387 |
}; |
387 |
}; |
| 388 |
|
388 |
|
|
|
389 |
subtest 'template() tests' => sub { |
| 390 |
plan tests => 2; |
| 391 |
|
| 392 |
$schema->storage->txn_begin; |
| 393 |
|
| 394 |
my $template = $builder->build_object( { class => 'Koha::Notice::Templates' } ); |
| 395 |
my $message = $builder->build_object( |
| 396 |
{ |
| 397 |
class => 'Koha::Notice::Messages', |
| 398 |
value => { letter_id => $template->id } |
| 399 |
} |
| 400 |
); |
| 401 |
|
| 402 |
is( ref( $message->template ), 'Koha::Notice::Template', 'Object type is correct' ); |
| 403 |
is( $message->template->id, $template->id, 'Right template linked' ); |
| 404 |
|
| 405 |
$schema->storage->txn_rollback; |
| 406 |
}; |
| 407 |
|
| 389 |
subtest 'search_limited' => sub { |
408 |
subtest 'search_limited' => sub { |
| 390 |
plan tests => 2; |
409 |
plan tests => 2; |
| 391 |
|
410 |
|
| 392 |
- |
|
|