Bug 14504: (QA followup) fix test transaction, book_on_loan
authorBarton Chittenden <barton@bywatersolutions.com>
Wed, 25 May 2016 14:12:43 +0000 (07:12 -0700)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 26 Aug 2016 12:07:26 +0000 (12:07 +0000)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
misc/cronjobs/delete_items.pl
t/db_dependent/Circulation/IsItemIssued.t

index f3d3de6..0e9e8d1 100755 (executable)
@@ -58,7 +58,7 @@ $GLOBAL->{sth}->{target_items}->execute();
 DELITEM: while ( my $item = $GLOBAL->{sth}->{target_items}->fetchrow_hashref() ) {
 
     my $status = C4::Items::ItemSafeToDelete( $item->{itemnumber}, $item->{biblionumber} );
-    if( $status == 1 )  {
+    if( $status eq '1' )  {
         C4::Items::DelItemCheck( $item->{itemnumber}, $item->{biblionumber} );
         verbose "Deleting '$item->{itemnumber}'";
     } else {
index 907a3cf..bafc405 100644 (file)
@@ -58,6 +58,8 @@ is(
     'item that is not on loan can be deleted',
 );
 
+$schema->storage->txn_rollback;
+
 # C4::Context->userenv
 sub Mock_userenv {
     return { branch => $library->{branchcode} };