koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/t/webscripts circulation.t,1.1.2.1,1.1.2.2


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha/t/webscripts circulation.t,1.1.2.1,1.1.2.2
Date: Tue, 29 Oct 2002 11:59:07 -0800

Update of /cvsroot/koha/koha/t/webscripts
In directory usw-pr-cvs1:/tmp/cvs-serv12388

Modified Files:
      Tag: rel-1-2
        circulation.t 
Log Message:
3 more circ tests.


Index: circulation.t
===================================================================
RCS file: /cvsroot/koha/koha/t/webscripts/Attic/circulation.t,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** circulation.t       29 Oct 2002 19:47:57 -0000      1.1.2.1
--- circulation.t       29 Oct 2002 19:59:05 -0000      1.1.2.2
***************
*** 1,3 ****
! BEGIN { $| = 1; print "1..7\n";
      $::intranetdir=`grep intranetdir /etc/koha.conf`;
      chomp $::intranetdir;
--- 1,3 ----
! BEGIN { $| = 1; print "1..10\n";
      $::intranetdir=`grep intranetdir /etc/koha.conf`;
      chomp $::intranetdir;
***************
*** 33,40 ****
  contains($script, $test, ['Librarian', 'Generic', 'Enter Book Barcode']);
  
  my $test='Circulation - issue item "T008" to "librarian"';
! my $script="$intranetdir/cgi-bin/circ/circulation.pl 
'barcode=T008&borrnumber=1&branch=MAIN&printer=lp&print=maybe&submit.x=Issue'";
  contains($script, $test, ['Librarian', 'Generic', 'Enter Book Barcode']);
  
  my $test='Circulation - returns.pl no parameters';
  my $script="$intranetdir/cgi-bin/circ/returns.pl";
--- 33,54 ----
  contains($script, $test, ['Librarian', 'Generic', 'Enter Book Barcode']);
  
+ my $test='Circulation - borrower card number "V10000008"';
+ my $script="$intranetdir/cgi-bin/circ/circulation.pl 
'findborrower=V10000008'";
+ contains($script, $test, ['Librarian', 'Generic', 'Enter Book Barcode']);
+ 
  my $test='Circulation - issue item "T008" to "librarian"';
! my $script="$intranetdir/cgi-bin/circ/circulation.pl 
'barcode=T008&borrnumber=1&branch=MAIN&printer=lp&print=maybe&day=0&month=0&year=0'";
  contains($script, $test, ['Librarian', 'Generic', 'Enter Book Barcode']);
  
+ $sth=$dbh->prepare("select date_due from issues where borrowernumber=1 and 
itemnumber=33 and isnull(returndate)");
+ $sth->execute;
+ if ($sth->rows) {
+     my ($date_due) = $sth->fetchrow;
+     # Should check that date_due was set correctly
+     print "ok ".$testnumber++." entry in issues table.\n";
+ } else {
+     print "not ok ".$testnumber++." no data in issues table.\n";
+ }
+ 
  my $test='Circulation - returns.pl no parameters';
  my $script="$intranetdir/cgi-bin/circ/returns.pl";
***************
*** 44,47 ****
--- 58,71 ----
  my $script="$intranetdir/cgi-bin/circ/returns.pl 'barcode=T008'";
  contains($script, $test, ['Librarian', 'Generic', 'Enter Book Barcode', 'The 
man in bearskin']);
+ 
+ $sth=$dbh->prepare("select date_due from issues where borrowernumber=1 and 
itemnumber=33 and isnull(returndate)");
+ $sth->execute;
+ if ($sth->rows) {
+     my ($date_due) = $sth->fetchrow;
+     # Should check that date_due was set correctly
+     print "not ok ".$testnumber++." still not returned in issues table.\n";
+ } else {
+     print "ok ".$testnumber++." marked returned in issues table.\n";
+ }
  
  my $test='Circulation - return unissued item "T009" ';




reply via email to

[Prev in Thread] Current Thread [Next in Thread]