Bugzilla – Attachment 40210 Details for
Bug 14155
Placing holds via ILSDI bypass some checks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
(qa followup) variable declaration and cleanup
qa-followup-variable-declaration-and-cleanup.patch (text/plain), 3.66 KB, created by
Indranil Das Gupta
on 2015-06-17 05:03:26 UTC
(
hide
)
Description:
(qa followup) variable declaration and cleanup
Filename:
MIME Type:
Creator:
Indranil Das Gupta
Created:
2015-06-17 05:03:26 UTC
Size:
3.66 KB
patch
obsolete
>From f30924bd83103053ed12f9e6c3f66d425fe1fecd Mon Sep 17 00:00:00 2001 >From: Indranil Das Gupta <indradg@gmail.com> >Date: Wed, 17 Jun 2015 10:21:50 +0530 >Subject: [PATCH] (qa followup) variable declaration and cleanup > >1/ running koha qa tools showed up valid FAIL. This patch fix > that error. > > FAIL t/db_dependent/Reserves.t > OK critic > OK forbidden patterns > OK pod > FAIL valid > "my" variable $title masks earlier declaration in same scope > "my" variable $bibitemnum masks earlier declaration in same scope > >2/ the following redundant line was removed as it had no use: > > t::lib::Mocks::mock_preference('maxreserves', 15); > >http://bugs.koha-community.org/show_bug.cgi?id=14155 >--- > t/db_dependent/Reserves.t | 24 ++++++++++++------------ > 1 file changed, 12 insertions(+), 12 deletions(-) > >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index 635fdce..5a109d7 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -81,36 +81,38 @@ my ($bibnum, $bibitemnum); > ($bibnum, $title, $bibitemnum) = AddBiblio($bib, ''); > > my $miniaturist = MARC::Record->new(); >-my $title = 'The Miniaturist'; >+my $title_14155a = 'The Miniaturist'; > if( C4::Context->preference('marcflavour') eq 'UNIMARC' ) { > $miniaturist->append_fields( > MARC::Field->new('600', '', '1', a => 'Burton, Jessie'), >- MARC::Field->new('200', '', '', a => $title), >+ MARC::Field->new('200', '', '', a => $title_14155a), > ); > } > else { > $miniaturist->append_fields( > MARC::Field->new('100', '', '', a => 'Burton, Jessie'), >- MARC::Field->new('245', '', '', a => $title), >+ MARC::Field->new('245', '', '', a => $title_14155a), > ); > } >-my ($miniaturist_id, $title, $bibitemnum) = AddBiblio($miniaturist, ''); >+my ($miniaturist_id, $bibitemnum_14155a); >+($miniaturist_id, $title_14155a, $bibitemnum_14155a) = AddBiblio($miniaturist, ''); > > my $broken = MARC::Record->new(); >-my $title = 'The broken'; >+my $title_14155b = 'The broken'; > if( C4::Context->preference('marcflavour') eq 'UNIMARC' ) { > $broken->append_fields( > MARC::Field->new('600', '', '1', a => 'Cohen, Tamar'), >- MARC::Field->new('200', '', '', a => $title), >+ MARC::Field->new('200', '', '', a => $title_14155b), > ); > } > else { > $broken->append_fields( > MARC::Field->new('100', '', '', a => 'Cohen, Tamar'), >- MARC::Field->new('245', '', '', a => $title), >+ MARC::Field->new('245', '', '', a => $title_14155b), > ); > } >-my ($broken_id, $title, $bibitemnum) = AddBiblio($broken, ''); >+my ($broken_id, $bibitemnum_14155b); >+($broken_id, $title_14155b, $bibitemnum_14155b) = AddBiblio($broken, ''); > > # Create a helper item instance for testing > my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => 'CPL', holdingbranch => 'CPL' } , $bibnum); >@@ -167,16 +169,14 @@ ok(!ReachedMaxReserves($borrowernumber), 'First borrower doesn\'t reached max re > > AddReserve($branch, $borrowernumber, $miniaturist_id, > $constraint, $bibitems, $priority, $resdate, $expdate, $notes, >- $title, $checkitem, $found); >+ $title_14155a, $checkitem, $found); > > AddReserve($branch, $borrowernumber, $broken_id, > $constraint, $bibitems, $priority, $resdate, $expdate, $notes, >- $title, $checkitem, $found); >+ $title_14155b, $checkitem, $found); > > ok(ReachedMaxReserves($borrowernumber), 'First borrower reached max reserves'); > >-t::lib::Mocks::mock_preference('maxreserves', 15); >- > my $ReservesControlBranch = C4::Context->preference('ReservesControlBranch'); > C4::Context->set_preference( 'ReservesControlBranch', 'ItemHomeLibrary' ); > ok( >-- >1.9.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 14155
:
38884
|
40170
|
40174
|
40175
|
40176
|
40208
|
40210
|
40239
|
40240
|
40241
|
44047
|
44048
|
44049
|
44050
|
44064