|
Lines 19-25
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
|
21 |
|
| 22 |
use Test::More tests => 4; |
22 |
use Test::More tests => 5; |
| 23 |
|
23 |
|
| 24 |
use C4::Letters qw( GetPreparedLetter EnqueueLetter ); |
24 |
use C4::Letters qw( GetPreparedLetter EnqueueLetter ); |
| 25 |
|
25 |
|
|
Lines 239-244
subtest 'patron() tests' => sub {
Link Here
|
| 239 |
$schema->storage->txn_rollback; |
239 |
$schema->storage->txn_rollback; |
| 240 |
}; |
240 |
}; |
| 241 |
|
241 |
|
|
|
242 |
subtest 'template() tests' => sub { |
| 243 |
plan tests => 2; |
| 244 |
|
| 245 |
$schema->storage->txn_begin; |
| 246 |
|
| 247 |
my $template = $builder->build_object( { class => 'Koha::Notice::Templates' } ); |
| 248 |
my $message = $builder->build_object( |
| 249 |
{ |
| 250 |
class => 'Koha::Notice::Messages', |
| 251 |
value => { letter_id => $template->id } |
| 252 |
} |
| 253 |
); |
| 254 |
|
| 255 |
is( ref( $message->template ), 'Koha::Notice::Template', 'Object type is correct' ); |
| 256 |
is( $message->template->id, $template->id, 'Right template linked' ); |
| 257 |
|
| 258 |
$schema->storage->txn_rollback; |
| 259 |
}; |
| 260 |
|
| 242 |
subtest 'search_limited' => sub { |
261 |
subtest 'search_limited' => sub { |
| 243 |
plan tests => 2; |
262 |
plan tests => 2; |
| 244 |
|
263 |
|
| 245 |
- |
|
|