Bugzilla – Attachment 18623 Details for
Bug 10290
UT: VirtualShelves.t needs to create its own data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10290: Followup for Virtualshelves.t
Bug-10290-Followup-for-Virtualshelvest.patch (text/plain), 3.74 KB, created by
Marcel de Rooy
on 2013-06-03 12:34:04 UTC
(
hide
)
Description:
Bug 10290: Followup for Virtualshelves.t
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-06-03 12:34:04 UTC
Size:
3.74 KB
patch
obsolete
>From a5b9497eb371486860d6ffeaedafb3de433217b2 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 3 Jun 2013 14:25:43 +0200 >Subject: [PATCH] Bug 10290: Followup for Virtualshelves.t >Content-Type: text/plain; charset=utf-8 > >Put the 10 biblionumbers in a list >Add a FIXME for deleting shelves >Do temporary repair on duplicate name test (Followup via report 10386) > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/VirtualShelves.t | 52 ++++++++++++++++---------------------- > 1 files changed, 22 insertions(+), 30 deletions(-) > >diff --git a/t/db_dependent/VirtualShelves.t b/t/db_dependent/VirtualShelves.t >index f73235b..323cc2c 100755 >--- a/t/db_dependent/VirtualShelves.t >+++ b/t/db_dependent/VirtualShelves.t >@@ -27,22 +27,14 @@ while(my $borrower = $sth->fetchrow){ > } > > # Creating some biblios >-my ($biblionumber1, $biblioitemnumber1) = AddBiblio(MARC::Record->new, ''); >-my ($biblionumber2, $biblioitemnumber2) = AddBiblio(MARC::Record->new, ''); >-my ($biblionumber3, $biblioitemnumber3) = AddBiblio(MARC::Record->new, ''); >-my ($biblionumber4, $biblioitemnumber4) = AddBiblio(MARC::Record->new, ''); >-my ($biblionumber5, $biblioitemnumber5) = AddBiblio(MARC::Record->new, ''); >-my ($biblionumber6, $biblioitemnumber6) = AddBiblio(MARC::Record->new, ''); >-my ($biblionumber7, $biblioitemnumber7) = AddBiblio(MARC::Record->new, ''); >-my ($biblionumber8, $biblioitemnumber8) = AddBiblio(MARC::Record->new, ''); >-my ($biblionumber9, $biblioitemnumber9) = AddBiblio(MARC::Record->new, ''); >-my ($biblionumber10, $biblioitemnumber10) = AddBiblio(MARC::Record->new, ''); >-my @biblionumbers = ( >- $biblionumber1, $biblionumber2, $biblionumber3, $biblionumber4, $biblionumber5, >- $biblionumber6, $biblionumber7, $biblionumber8, $biblionumber9, $biblionumber10, >-); >+my @biblionumbers; >+foreach(0..9) { >+ my ($biblionumber)= AddBiblio(MARC::Record->new, ''); >+ #item number ignored >+ push @biblionumbers, $biblionumber; >+} > >-# --- >+# FIXME Why are you deleting my shelves? See bug 10386. > my $delete_virtualshelf = q{ > DELETE FROM virtualshelves WHERE 1 > }; >@@ -82,9 +74,19 @@ ok(10 == scalar @shelves, 'created 10 lists'); # 10 shelves in @shelves; > # try to create some shelf which already exists. > for(my $i=0;$i<10;$i++){ > my @shlf=GetShelf($shelves[$i]); >- my $badNumShelf = AddShelf( >- {shelfname=>"Shelf_".$i, category=>$shlf[3] }, $borrowers[$i]); >- ok(-1 == $badNumShelf, 'do not create lists with duplicate names'); # AddShelf returns -1 if name already exist. >+ >+ # FIXME This test still needs some attention >+ # A shelf name is not per se unique ! See report 10386 >+ #temporary hack: Original test only for public list >+ if( $shlf[3]==2 ) { >+ my $badNumShelf= AddShelf( >+ {shelfname=>"Shelf_".$i, category => 2}, $borrowers[$i]); >+ ok(-1==$badNumShelf, 'do not create public lists with duplicate names'); >+ #AddShelf returns -1 if name already exist. >+ } >+ else { >+ ok(1==1, "This trivial test cannot fail :)"); #leave count intact >+ } > } > > #-----------TEST AddToShelf & GetShelfContents & DelFromShelf functions--------------# >@@ -147,15 +149,5 @@ for(my $i=0; $i<10;$i++){ > ok(1 == $status, "deleted shelf $shelfnumber and its contents"); > } > >-END { >- DelBiblio( $biblionumber1 ); >- DelBiblio( $biblionumber2 ); >- DelBiblio( $biblionumber3 ); >- DelBiblio( $biblionumber4 ); >- DelBiblio( $biblionumber5 ); >- DelBiblio( $biblionumber6 ); >- DelBiblio( $biblionumber7 ); >- DelBiblio( $biblionumber8 ); >- DelBiblio( $biblionumber9 ); >- DelBiblio( $biblionumber10 ); >-}; >+#----------------------- CLEANUP ----------------------------------------------# >+DelBiblio($_) for @biblionumbers; >-- >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 10290
:
18253
|
18398
|
18623
|
18624
|
18625