Lines 59-65
subtest 'basket() tests' => sub {
Link Here
|
59 |
|
59 |
|
60 |
subtest 'biblio() tests' => sub { |
60 |
subtest 'biblio() tests' => sub { |
61 |
|
61 |
|
62 |
plan tests => 3; |
62 |
plan tests => 5; |
63 |
|
63 |
|
64 |
$schema->storage->txn_begin; |
64 |
$schema->storage->txn_begin; |
65 |
|
65 |
|
Lines 80-85
subtest 'biblio() tests' => sub {
Link Here
|
80 |
is( ref($THE_biblio), 'Koha::Biblio', 'Returns a Koha::Biblio object' ); |
80 |
is( ref($THE_biblio), 'Koha::Biblio', 'Returns a Koha::Biblio object' ); |
81 |
is( $THE_biblio->biblionumber, $biblio->biblionumber, 'It is not cheating about the object' ); |
81 |
is( $THE_biblio->biblionumber, $biblio->biblionumber, 'It is not cheating about the object' ); |
82 |
|
82 |
|
|
|
83 |
$order->biblio->delete; |
84 |
$order = Koha::Acquisition::Orders->find($order->ordernumber); |
85 |
ok( $order, 'The order is not deleted if the biblio is deleted' ); |
86 |
is( $order->biblio, undef, 'order.biblio is correctly set to NULL when the biblio is deleted' ); |
87 |
|
83 |
$schema->storage->txn_rollback; |
88 |
$schema->storage->txn_rollback; |
84 |
}; |
89 |
}; |
85 |
|
90 |
|
86 |
- |
|
|