[Koha-cvs] CVS: koha/t Shelf.t,1.1,1.2
Steve Tonnesen
tonnesen at users.sourceforge.net
Thu Oct 24 06:12:12 CEST 2002
Update of /cvsroot/koha/koha/t
In directory usw-pr-cvs1:/tmp/cvs-serv15561/t
Modified Files:
Shelf.t
Log Message:
Added a couple of tests.
Index: Shelf.t
===================================================================
RCS file: /cvsroot/koha/koha/t/Shelf.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Shelf.t 23 Oct 2002 23:32:47 -0000 1.1
--- Shelf.t 24 Oct 2002 04:12:10 -0000 1.2
***************
*** 37,47 ****
! # Add an item to a shelf
! for ($i=1; $i<20; $i++) {
$shelf->addtoshelf( -add => [[ $$itemdata[$i]->{biblionumber},
$$itemdata[$i]->{biblioitemnumber},
$$itemdata[$i]->{itemnumber} ]]);
}
--- 37,66 ----
! # Add some items to the shelves
! for ($i=0; $i<20; $i++) {
$shelf->addtoshelf( -add => [[ $$itemdata[$i]->{biblionumber},
$$itemdata[$i]->{biblioitemnumber},
$$itemdata[$i]->{itemnumber} ]]);
}
+ for ($i=20; $i<30; $i++) {
+ $shelf2->addtoshelf( -add => [[ $$itemdata[$i]->{biblionumber},
+ $$itemdata[$i]->{biblioitemnumber},
+ $$itemdata[$i]->{itemnumber} ]]);
+ }
+ if ($shelf->itemcounter() == 20 && $shelf2->itemcounter() == 10 ) {
+ print "ok 4\n";
+ } else {
+ print "not ok 4\n";
+ }
+
+ $shelf->attribute('testattribute1', 'testvalue1');
+ $shelf->attribute('testattribute2', 'testvalue2');
+
+ if ($shelf->attribute('testattribute1') eq 'testvalue1' && $shelf->attribute('testattribute2') eq 'testvalue2') {
+ print "ok 5\n";
+ } else {
+ print "not ok 5\n";
+ }
More information about the Koha-cvs
mailing list