Fix how update and addRevision handle defaults from the definition subroutine

when it returns an array ref.
This commit is contained in:
Colin Kuskie 2008-08-19 22:03:39 +00:00
parent c7fcd40a25
commit c6e9d322a8
4 changed files with 10 additions and 1 deletions

View file

@ -15,7 +15,7 @@ use lib "$FindBin::Bin/../lib";
use WebGUI::Test;
use WebGUI::Session;
use WebGUI::Asset::Template;
use Test::More tests => 10; # increment this value for each test you create
use Test::More tests => 11; # increment this value for each test you create
use Test::Deep;
my $session = WebGUI::Test->session;
@ -38,6 +38,8 @@ my $importNode = WebGUI::Asset::Template->getImportNode($session);
my $template = $importNode->addChild({className=>"WebGUI::Asset::Template", title=>"test", url=>"testingtemplates", template=>$template, namespace=>'WebGUI Test Template'});
isa_ok($template, 'WebGUI::Asset::Template', "creating a template");
is($template->get('parser'), 'WebGUI::Asset::Template::HTMLTemplate', 'default parser is HTMLTemplate');
$var{variable} = "BBBBB";
$output = $template->process(\%var);
ok($output =~ m/\bBBBBB\b/, "process() - variables");