Update tests for bad macros to check template attachments. Fixes bug #12087

This commit is contained in:
Colin Kuskie 2011-04-04 16:31:44 -07:00
parent 73261e4651
commit 83d1897852
6 changed files with 24 additions and 2 deletions

View file

@ -52,10 +52,13 @@ my @templateLabels;
while (my $templateAsset = $getATemplate->()) {
my $template = $templateAsset->get('template');
my $header = $templateAsset->get('extraHeadTags');
my $match = ($template =~ $macro);
my $match = ($template =~ $macro);
if ($header) {
$match ||= ($header =~ $macro);
}
foreach my $attachment (@{ $templateAsset->getAttachments }) {
$match ||= ($attachment->{url} =~ $macro);
}
ok(!$match, sprintf "%s: %s (%s) has no bad extras macros", $templateAsset->getTitle, $templateAsset->getId, $templateAsset->getUrl);
}