From 04a0d942954d62f228f5ce0be1c01c10c726cbf2 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Wed, 6 Oct 2010 13:33:16 -0400 Subject: [PATCH] Bug 5284 - Generic report covering various problems with the labels/patron card tests This patch fixes the C4::Labels::Template tests --- C4/Creators/Template.pm | 2 +- t/db_dependent/Labels/t_Template.t | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/Creators/Template.pm b/C4/Creators/Template.pm index 0bbeadfa6e..8a7564c491 100644 --- a/C4/Creators/Template.pm +++ b/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; diff --git a/t/db_dependent/Labels/t_Template.t b/t/db_dependent/Labels/t_Template.t index bd57a239db..9c5d2766a5 100644 --- a/t/db_dependent/Labels/t_Template.t +++ b/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', -- 2.39.5