Keywords fixes to prevent leaks.
This commit is contained in:
parent
87d252ec26
commit
1c08796d6c
2 changed files with 4 additions and 7 deletions
|
|
@ -346,6 +346,7 @@ $templateMock->mock('process', sub { $templateVars = $_[1]; } );
|
|||
'eventSubmissionTemplateId' => ignore(),
|
||||
'submittedLocationsList' => ignore(),
|
||||
'tickets_loop' => \@ticketArray,
|
||||
keywords => ignore(),
|
||||
},
|
||||
"www_printRemainingTickets: template variables valid"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -24,17 +24,13 @@ plan tests => 1;
|
|||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
##Set the maximum assets to 5
|
||||
WebGUI::Test->originalConfig('maximumAssets');
|
||||
$session->config->set('maximumAssets', 5);
|
||||
|
||||
my $rootAsset = WebGUI::Asset->getRoot($session);
|
||||
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
$rootAsset->addRevision({keywords => 'one,two,three,four'});
|
||||
my $snippet = $rootAsset->addChild({keywords => 'one,two,three,four', className=>'WebGUI::Asset::Snippet'});
|
||||
$versionTag->commit;
|
||||
$rootAsset = $rootAsset->cloneFromDb;
|
||||
$snippet = $snippet->cloneFromDb;
|
||||
|
||||
##Override the user function style template so we can examine its output easily
|
||||
#1234567890123456789012#
|
||||
|
|
@ -47,7 +43,7 @@ $templateMock->mock('process', sub { $templateVars = clone($_[1]); } );
|
|||
|
||||
{
|
||||
WebGUI::Test->mockAssetId($templateId, $templateMock);
|
||||
$rootAsset->processTemplate({}, $templateId);
|
||||
$snippet->processTemplate({}, $templateId);
|
||||
use WebGUI::Keyword;
|
||||
my $keywords = WebGUI::Keyword::string2list($templateVars->{keywords});
|
||||
cmp_bag($keywords, [qw/one two three four/], 'Keywords are available when running processTemplate');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue