Bugzilla – Attachment 21208 Details for
Bug 9761
Make it possible to confirm future hold requests at checkin time
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9761: Preliminary measures for adding a unit test
Bug-9761-Preliminary-measures-for-adding-a-unit-te.patch (text/plain), 1.92 KB, created by
Marcel de Rooy
on 2013-09-18 14:34:55 UTC
(
hide
)
Description:
Bug 9761: Preliminary measures for adding a unit test
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-09-18 14:34:55 UTC
Size:
1.92 KB
patch
obsolete
>From 009151793367c2e84be7a2de77ef11a3427ea02d Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 18 Sep 2013 16:12:09 +0200 >Subject: [PATCH] Bug 9761: Preliminary measures for adding a unit test >Content-Type: text/plain; charset=utf-8 > >Optionally add some branches and categories that may not exist. > >Test plan: >Run the test with or without CPL branch or ST category. >Verify that the test does not fail. >--- > t/db_dependent/Reserves.t | 14 ++++++++++++++ > 1 files changed, 14 insertions(+), 0 deletions(-) > >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index f511c41..7846fb3 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -22,6 +22,17 @@ $dbh->{AutoCommit} = 0; > $dbh->{RaiseError} = 1; > > # Setup Test------------------------ >+ >+# Add branches if not existing >+foreach my $addbra ('CPL', 'FPL', 'RPL') { >+ $dbh->do("INSERT INTO branches (branchcode,branchname) VALUES (?,?)", undef, ($addbra,"$addbra branch")) unless GetBranchName($addbra); >+} >+ >+# Add categories if not existing >+foreach my $addcat ('S', 'PT') { >+ $dbh->do("INSERT INTO categories (categorycode,hidelostitems,category_type) VALUES (?,?,?)",undef,($addcat, 0, $addcat eq 'S'? 'S': 'A')) unless GetBorrowercategory($addcat); >+} >+ > # Helper biblio. > diag("\nCreating biblio instance for testing."); > my $bib = MARC::Record->new(); >@@ -32,6 +43,7 @@ $bib->append_fields( > ); > my ($bibnum, $bibitemnum); > ($bibnum, $title, $bibitemnum) = AddBiblio($bib, ''); >+ > # Helper item for that biblio. > diag("Creating item instance for testing."); > my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => 'CPL', holdingbranch => 'CPL' } , $bibnum); >@@ -199,3 +211,5 @@ is( $messages->{ResFound}->{borrowernumber}, > is( $messages->{ResFound}->{borrowernumber}, > $requesters{'RPL'}, > 'for generous library, its items fill first hold request in line (bug 10272)'); >+ >+$dbh->rollback; >-- >1.7.7.6
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 9761
:
15932
|
15933
|
15951
|
15980
|
15981
|
15982
|
18609
|
18610
|
18611
|
18612
|
18613
|
18614
|
18615
|
21193
|
21197
|
21198
|
21208
|
21209
|
21227
|
21280