Bugzilla – Attachment 150737 Details for
Bug 33262
When an ordered record is deleted, we lose all information on what was ordered
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33262: Unit tests
Bug-33262-Unit-tests.patch (text/plain), 1.77 KB, created by
Nick Clemens (kidclamp)
on 2023-05-05 12:04:16 UTC
(
hide
)
Description:
Bug 33262: Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-05-05 12:04:16 UTC
Size:
1.77 KB
patch
obsolete
>From ebb2ffefbe7567df9e7487c0daf0a48889f698b5 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Thu, 4 May 2023 13:08:54 +0000 >Subject: [PATCH] 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> >--- > t/db_dependent/Biblio.t | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t >index ab8c2f6d43..10df3a8856 100755 >--- a/t/db_dependent/Biblio.t >+++ b/t/db_dependent/Biblio.t >@@ -653,7 +653,7 @@ subtest 'deletedbiblio_metadata' => sub { > > subtest 'DelBiblio' => sub { > >- plan tests => 5; >+ plan tests => 6; > > 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 > 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( $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 { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33262
:
150647
|
150657
|
150658
|
150659
|
150660
|
150661
|
150662
|
150663
|
150664
|
150680
|
150681
|
150682
|
150683
|
150684
|
150702
|
150703
|
150704
|
150705
|
150706
|
150734
|
150735
|
150736
| 150737 |
150738