Bug 33262: Unit tests
prove t/db_dependent/Biblio.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
c8faeac4cd
commit
177b53d794
1 changed files with 12 additions and 1 deletions
|
@ -653,7 +653,7 @@ subtest 'deletedbiblio_metadata' => sub {
|
||||||
|
|
||||||
subtest 'DelBiblio' => sub {
|
subtest 'DelBiblio' => sub {
|
||||||
|
|
||||||
plan tests => 5;
|
plan tests => 6;
|
||||||
|
|
||||||
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 0 );
|
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 0 );
|
||||||
|
|
||||||
|
@ -689,10 +689,21 @@ subtest 'DelBiblio' => sub {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
my $order_basket = $builder->build( { source => 'Aqbasket' } );
|
||||||
|
|
||||||
|
my $orderinfo = {
|
||||||
|
biblionumber => $biblio->biblionumber,
|
||||||
|
basketno => $order_basket->{basketno},
|
||||||
|
};
|
||||||
|
my $order = $builder->build_object(
|
||||||
|
{ class => 'Koha::Acquisition::Orders', value => $orderinfo } );
|
||||||
|
|
||||||
C4::Biblio::DelBiblio($biblio->biblionumber); # Or $biblio->delete
|
C4::Biblio::DelBiblio($biblio->biblionumber); # Or $biblio->delete
|
||||||
is( $subscription->get_from_storage, undef, 'subscription should be deleted on biblio deletion' );
|
is( $subscription->get_from_storage, undef, 'subscription should be deleted on biblio deletion' );
|
||||||
is( $serial->get_from_storage, undef, 'serial should be deleted on biblio deletion' );
|
is( $serial->get_from_storage, undef, 'serial should be deleted on biblio deletion' );
|
||||||
is( $subscription_history->get_from_storage, undef, 'subscription history should be deleted on biblio deletion' );
|
is( $subscription_history->get_from_storage, undef, 'subscription history should be deleted on biblio deletion' );
|
||||||
|
is( $order->get_from_storage->deleted_biblionumber, $biblio->biblionumber, 'biblionumber of order has been moved to deleted_biblionumber column' );
|
||||||
};
|
};
|
||||||
|
|
||||||
subtest 'MarcFieldForCreatorAndModifier' => sub {
|
subtest 'MarcFieldForCreatorAndModifier' => sub {
|
||||||
|
|
Loading…
Reference in a new issue