Browse Source

Bug 5284 - Generic report covering various problems with the labels/patron card tests

This patch fixes the C4::Labels::Template tests
3.2.x
Chris Nighswonger 14 years ago
parent
commit
04a0d94295
  1. 2
      C4/Creators/Template.pm
  2. 4
      t/db_dependent/Labels/t_Template.t

2
C4/Creators/Template.pm

@ -154,7 +154,7 @@ sub delete {
warn sprintf('%s : Cannot delete template as the creator type is invalid or non-existant.', $call_type) if !$query_params[1];
return -1;
}
my $query = "DELETE FROM " . $opts{'table_name'} . " WHERE template_id = ? AND creator = ?";
my $query = "DELETE FROM creator_templates WHERE template_id = ? AND creator = ?";
my $sth = C4::Context->dbh->prepare($query);
$sth->execute(@query_params);
$self->{'template_stat'} = 0;

4
t/db_dependent/Labels/t_Template.t

@ -20,7 +20,7 @@
use strict;
use warnings;
use Test::More tests => 52;
use Test::More tests => 54;
use C4::Context;
use Data::Dumper;
@ -29,6 +29,7 @@ BEGIN {
}
my $expect_template = {
creator => 'Labels',
profile_id => 0,
template_code => 'DEFAULT TEMPLATE',
template_desc => 'Default description',
@ -61,6 +62,7 @@ foreach my $key (keys %{$expect_template}) {
diag "Testing Template->set_attr() method.";
my $new_attr = {
creator => 'Labels',
profile_id => 0,
template_code => 'Avery 5160 | 1 x 2-5/8',
template_desc => '3 columns, 10 rows of labels',

Loading…
Cancel
Save