Bug 24440: Adding 2 more tests for ->biblio
Not directly related to the other changes but seems good to have them here. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
ffb5fb60ed
commit
4f4405174d
1 changed files with 6 additions and 1 deletions
|
@ -59,7 +59,7 @@ subtest 'basket() tests' => sub {
|
|||
|
||||
subtest 'biblio() tests' => sub {
|
||||
|
||||
plan tests => 3;
|
||||
plan tests => 5;
|
||||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
|
@ -80,6 +80,11 @@ subtest 'biblio() tests' => sub {
|
|||
is( ref($THE_biblio), 'Koha::Biblio', 'Returns a Koha::Biblio object' );
|
||||
is( $THE_biblio->biblionumber, $biblio->biblionumber, 'It is not cheating about the object' );
|
||||
|
||||
$order->biblio->delete;
|
||||
$order = Koha::Acquisition::Orders->find($order->ordernumber);
|
||||
ok( $order, 'The order is not deleted if the biblio is deleted' );
|
||||
is( $order->biblio, undef, 'order.biblio is correctly set to NULL when the biblio is deleted' );
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue