From 49f7faf34a89db2b01babaa857a97736eb1a7807 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Wed, 6 Oct 2010 12:52:55 -0400 Subject: [PATCH] Bug 5284 - Generic report covering various problems with the labels/patron card tests This patch fixes the C4::Labels::Batch tests --- C4/Creators/Batch.pm | 1 + t/db_dependent/Labels/t_Batch.t | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/Creators/Batch.pm b/C4/Creators/Batch.pm index cff7419f56..f54e3dad78 100644 --- a/C4/Creators/Batch.pm +++ b/C4/Creators/Batch.pm @@ -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 } diff --git a/t/db_dependent/Labels/t_Batch.t b/t/db_dependent/Labels/t_Batch.t index 524b4f71ff..b61f4de235 100644 --- a/t/db_dependent/Labels/t_Batch.t +++ b/t/db_dependent/Labels/t_Batch.t @@ -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 -- 2.39.5