|
Lines 19-25
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
|
21 |
|
| 22 |
use Test::More tests => 1; |
22 |
use Test::More tests => 2; |
| 23 |
|
23 |
|
| 24 |
use C4::Letters qw( GetPreparedLetter EnqueueLetter ); |
24 |
use C4::Letters qw( GetPreparedLetter EnqueueLetter ); |
| 25 |
|
25 |
|
|
Lines 119-122
WRAPPED
Link Here
|
| 119 |
$schema->storage->txn_rollback; |
119 |
$schema->storage->txn_rollback; |
| 120 |
}; |
120 |
}; |
| 121 |
|
121 |
|
|
|
122 |
subtest 'patron() tests' => sub { |
| 123 |
|
| 124 |
plan tests => 2; |
| 125 |
|
| 126 |
$schema->storage->txn_begin; |
| 127 |
|
| 128 |
my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); |
| 129 |
my $message = $builder->build_object( |
| 130 |
{ |
| 131 |
class => 'Koha::Notice::Messages', |
| 132 |
value => { borrowernumber => $patron->borrowernumber } |
| 133 |
} |
| 134 |
); |
| 135 |
|
| 136 |
is( ref( $message->patron ), 'Koha::Patron', 'Object type is correct' ); |
| 137 |
is( $message->patron->borrowernumber, $patron->borrowernumber, 'Right patron linked' ); |
| 138 |
|
| 139 |
$schema->storage->txn_rollback; |
| 140 |
}; |
| 141 |
|
| 122 |
1; |
142 |
1; |
| 123 |
- |
|
|