|
Lines 219-222
WRAPPED
Link Here
|
| 219 |
$schema->storage->txn_rollback; |
219 |
$schema->storage->txn_rollback; |
| 220 |
}; |
220 |
}; |
| 221 |
|
221 |
|
|
|
222 |
subtest 'patron() tests' => sub { |
| 223 |
|
| 224 |
plan tests => 2; |
| 225 |
|
| 226 |
$schema->storage->txn_begin; |
| 227 |
|
| 228 |
my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); |
| 229 |
my $message = $builder->build_object( |
| 230 |
{ |
| 231 |
class => 'Koha::Notice::Messages', |
| 232 |
value => { borrowernumber => $patron->borrowernumber } |
| 233 |
} |
| 234 |
); |
| 235 |
|
| 236 |
is( ref( $message->patron ), 'Koha::Patron', 'Object type is correct' ); |
| 237 |
is( $message->patron->borrowernumber, $patron->borrowernumber, 'Right patron linked' ); |
| 238 |
|
| 239 |
$schema->storage->txn_rollback; |
| 240 |
}; |
| 241 |
|
| 222 |
1; |
242 |
1; |
| 223 |
- |
|
|