Bug 5284 - Generic report covering various problems with the labels/patron card tests
authorChris Nighswonger <cnighswonger@foundations.edu>
Wed, 6 Oct 2010 16:52:55 +0000 (12:52 -0400)
committerChris Nighswonger <cnighswonger@foundations.edu>
Wed, 6 Oct 2010 16:52:55 +0000 (12:52 -0400)
This patch fixes the C4::Labels::Batch tests

C4/Creators/Batch.pm
t/db_dependent/Labels/t_Batch.t

index cff7419..f54e3da 100644 (file)
@@ -149,6 +149,7 @@ sub retrieve {
     };
     while (my $record = $sth->fetchrow_hashref) {
         $self->{'branch_code'} = $record->{'branch_code'};
+        $self->{'creator'} = $record->{'creator'};
         push (@{$self->{'items'}}, {$number_type => $record->{$number_type}, label_id => $record->{'label_id'}});
         $record_flag = 1;       # true if one or more rows were retrieved
     }
index 524b4f7..b61f4de 100644 (file)
@@ -20,7 +20,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 22;
+use Test::More tests => 23;
 use C4::Context;
 use Data::Dumper;
 
@@ -33,6 +33,7 @@ $sth->execute();
 my $branch_code = $sth->fetchrow_hashref()->{'branchcode'};
 diag sprintf('Database returned the following error: %s', $sth->errstr) if $sth->errstr;
 my $expected_batch = {
+        creator         => 'Labels',
         items           => [],
         branch_code     => $branch_code,
         batch_stat      => 0,   # False if any data has changed and the db has not been updated