add "asset" property to AssetHelpers.

Simplifies the API and allows us to have getForm and getUrl to make
asset helpers easier to build.
This commit is contained in:
Doug Bell 2011-03-25 14:49:44 -05:00
parent df31c13e13
commit 698f40a6dd
23 changed files with 216 additions and 123 deletions

View file

@ -31,7 +31,6 @@ my $session = WebGUI::Test->session;
# Tests
my $output;
my $helper = WebGUI::AssetHelper::EditBranch->new( id => 'edit_branch', session => $session );
my $node = WebGUI::Asset->getImportNode($session);
my $root = WebGUI::Asset->getRoot( $session );
my $top = $node->addChild({
@ -54,8 +53,9 @@ $tag->commit;
WebGUI::Test->addToCleanup( $top, $child, $grand );
{
my $helper = WebGUI::AssetHelper::EditBranch->new( id => 'edit_branch', session => $session, asset => $top );
$output = $helper->process($top);
$output = $helper->process;
cmp_deeply(
$output,
{