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