Update tests for bad macros to check template attachments. Fixes bug #12087
This commit is contained in:
parent
73261e4651
commit
83d1897852
6 changed files with 24 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ my $macro = qr{
|
|||
|
||||
$numTests = $session->db->quickScalar('select count(distinct(assetId)) from template');
|
||||
|
||||
plan tests => 2*$numTests;
|
||||
plan tests => 3*$numTests;
|
||||
|
||||
my $validLinks = 0;
|
||||
|
||||
|
|
@ -91,4 +91,9 @@ TEMPLATE: while (my $templateAsset = $getATemplate->()) {
|
|||
$parser->parse($template);
|
||||
ok($validLinks, sprintf "%s: %s (%s) has no rooted link urls in the template", $templateAsset->getTitle, $templateAsset->getId, $templateAsset->getUrl);
|
||||
}
|
||||
my $bad_attachments = 0;
|
||||
foreach my $attachment (@{ $templateAsset->getAttachments }) {
|
||||
++$bad_attachments if $attachment->{url} !~ $nonRootLink;
|
||||
}
|
||||
ok $bad_attachments == 0, sprintf "%s: %s (%s) has no rooted link urls in the template attachments", $templateAsset->getTitle, $templateAsset->getId, $templateAsset->getUrl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue