Bugzilla – Attachment 118287 Details for
Bug 24295
C4::Circulation::GetTransfers should be removed, use Koha::Item->get_transfer instead
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24295: Replace GetTransfers in t/db_dependent/Circulation.t
Bug-24295-Replace-GetTransfers-in-tdbdependentCirc.patch (text/plain), 2.61 KB, created by
Martin Renvoize (ashimema)
on 2021-03-16 08:57:29 UTC
(
hide
)
Description:
Bug 24295: Replace GetTransfers in t/db_dependent/Circulation.t
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-16 08:57:29 UTC
Size:
2.61 KB
patch
obsolete
>From 305ba1dd19bd1631cb26357578a1cf26a72e047f Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 16 Mar 2021 08:56:18 +0000 >Subject: [PATCH] Bug 24295: Replace GetTransfers in > t/db_dependent/Circulation.t > >Replace the call to GetTransfers with the get_transfer method in >Koha::Item in Ciculation.t > >Test plan >1/ Run t/db_dependent/Circulation.t >2/ Confirm it passes >3/ Apply patch >4/ Repeat steps 1-2 >--- > t/db_dependent/Circulation.t | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index d0bfe6e207..ee371ed840 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -3426,17 +3426,17 @@ subtest 'Cancel transfers on lost items' => sub { > is( $hold->found, 'T', 'Hold is in transit' ); > > #Check transfer exists and the items holding branch is the transfer destination branch before marking it as lost >- my ($datesent,$frombranch,$tobranch) = GetTransfers($item->itemnumber); >- is( $frombranch, $library_1->{branchcode}, 'The transfer is generated from the correct library'); >- is( $tobranch, $library_2->{branchcode}, 'The transfer is generated to the correct library'); >+ my $transfer = $item->get_transfer; >+ is( $transfer->frombranch, $library_1->{branchcode}, 'The transfer is generated from the correct library'); >+ is( $transfer->tobranch, $library_2->{branchcode}, 'The transfer is generated to the correct library'); > my $itemcheck = Koha::Items->find($item->itemnumber); > is( $itemcheck->holdingbranch, $library_1->{branchcode}, 'Items holding branch is the transfers origination branch before it is marked as lost' ); > >- #Simulate item being marked as lost and confirm the transfer is deleted and the items holding branch is the transfers source branch >+ #Simulate item being marked as lost and confirm the transfer is cancelled and the items holding branch is the transfers source branch > $item->itemlost(1)->store; > LostItem( $item->itemnumber, 'test', 1 ); >- ($datesent,$frombranch,$tobranch) = GetTransfers($item->itemnumber); >- is( $tobranch, undef, 'The transfer on the lost item has been deleted as the LostItemCancelOutstandingTransfer is enabled'); >+ $transfer = $item->get_transfer; >+ is( $transfer, undef, 'The transfer on the lost item has been cancelled as the LostItemCancelOutstandingTransfer is enabled'); > $itemcheck = Koha::Items->find($item->itemnumber); > is( $itemcheck->holdingbranch, $library_1->{branchcode}, 'Lost item with cancelled hold has holding branch equallying the transfers source branch' ); > >-- >2.20.1
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 24295
:
118242
|
118243
|
118244
|
118245
|
118246
|
118247
|
118248
|
118249
|
118250
|
118287
|
118295
|
118296
|
118297
|
118298
|
118299
|
118300
|
118301
|
118302
|
118303
|
118304
|
118305
|
118306
|
118307
|
118308
|
118309
|
118310
|
119854
|
119855
|
119856
|
119857
|
119858
|
119859
|
119860
|
119861
|
119862
|
119863
|
119864
|
119866
|
119867
|
127465
|
127466
|
127467
|
127468
|
127469
|
127470
|
127471
|
127472
|
127473
|
127474
|
127475
|
127476
|
127477
|
130430
|
130431
|
130432
|
130433
|
130434
|
130435
|
130436
|
130437
|
130438
|
130439
|
130440
|
130441
|
130442
|
139546
|
139547
|
139548
|
139549
|
139550
|
139551
|
139552
|
139553
|
139554
|
139555
|
139556
|
139557
|
139558
|
139655
|
139656
|
139657
|
139658
|
139659
|
139660
|
139661
|
139662
|
139663
|
139664
|
139665
|
139666
|
139667