Bugzilla – Attachment 124989 Details for
Bug 28472
UpdateItemLocationOnCheckin not updating items where location is null
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28472: (follow-up) add unit test for the case where location = NULL
Bug-28472-follow-up-add-unit-test-for-the-case-whe.patch (text/plain), 2.07 KB, created by
Andreas Roussos
on 2021-09-17 14:03:17 UTC
(
hide
)
Description:
Bug 28472: (follow-up) add unit test for the case where location = NULL
Filename:
MIME Type:
Creator:
Andreas Roussos
Created:
2021-09-17 14:03:17 UTC
Size:
2.07 KB
patch
obsolete
>From 8b4938e980e2b142667616b6b4be19537b1d0520 Mon Sep 17 00:00:00 2001 >From: Andreas Roussos <a.roussos@dataly.gr> >Date: Fri, 17 Sep 2021 15:51:51 +0200 >Subject: [PATCH] Bug 28472: (follow-up) add unit test for the case where > location = NULL > >This patch adds an extra unit test, to cover the case where the >UpdateItemLocationOnCheckin System Preference is set to "_ALL_: CART" >and the item being returned has no shelving location set. > >Test plan: > >1) Apply the patch provided earlier >2) prove -v t/db_dependent/Circulation/issue.t > ...and sign off if all tests pass. >--- > t/db_dependent/Circulation/issue.t | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation/issue.t b/t/db_dependent/Circulation/issue.t >index d4fb82b55b..0d693710d3 100755 >--- a/t/db_dependent/Circulation/issue.t >+++ b/t/db_dependent/Circulation/issue.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 47; >+use Test::More tests => 48; > use DateTime::Duration; > > use t::lib::Mocks; >@@ -467,6 +467,23 @@ $item2 = Koha::Items->find( $itemnumber2 ); > ok( $item2->location eq '' , q{UpdateItemLocationOnCheckin updates location value from 'PROC' to '' with setting "PROC: _PERM_" } ); > ok( $item2->permanent_location eq '' , q{UpdateItemLocationOnCheckin does not update permanent_location from '' with setting "PROC: _PERM_" } ); > >+# Bug 28472 >+my $itemnumber3 = Koha::Item->new( >+ { >+ biblionumber => $biblionumber, >+ barcode => 'barcode_5', >+ itemcallnumber => 'callnumber5', >+ homebranch => $branchcode_1, >+ holdingbranch => $branchcode_1, >+ location => undef, >+ itype => $itemtype >+ } >+)->store->itemnumber; >+ >+t::lib::Mocks::mock_preference( 'UpdateItemLocationOnCheckin', '_ALL_: CART' ); >+AddReturn( 'barcode_5', $branchcode_1 ); >+my $item3 = Koha::Items->find( $itemnumber3 ); >+ok( $item3->location eq 'CART', q{UpdateItemLocationOnCheckin updates location value from NULL (i.e. the item has no shelving location set) to 'CART' with setting "_ALL_: CART"} ); > > > >-- >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 28472
:
122541
|
122547
|
122749
|
124989
|
125011
|
125012
|
125033
|
125034
|
125050