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