change AssetHelpers to have short IDs instead of class names
This will make better code reuse: The Asset Manager will instead call the AssetHelper with the id of "cut" or "copy" to get the correct operation.
This commit is contained in:
parent
f249070c50
commit
b9e879b7aa
22 changed files with 156 additions and 115 deletions
|
|
@ -31,10 +31,11 @@ my $session = WebGUI::Test->session;
|
|||
# Tests
|
||||
|
||||
my $output;
|
||||
my $helper = WebGUI::AssetHelper::Cut->new( id => 'cut', session => $session );
|
||||
my $import = WebGUI::Asset->getImportNode($session);
|
||||
|
||||
$session->user({userId => 1});
|
||||
$output = WebGUI::AssetHelper::Cut->process($import);
|
||||
$output = $helper->process($import);
|
||||
cmp_deeply(
|
||||
$output,
|
||||
{
|
||||
|
|
@ -44,7 +45,7 @@ cmp_deeply(
|
|||
);
|
||||
|
||||
$session->user({userId => 3});
|
||||
$output = WebGUI::AssetHelper::Cut->process($import);
|
||||
$output = $helper->process($import);
|
||||
cmp_deeply(
|
||||
$output,
|
||||
{
|
||||
|
|
@ -54,7 +55,7 @@ cmp_deeply(
|
|||
);
|
||||
|
||||
my $safe_page = $import->getFirstChild;
|
||||
$output = WebGUI::AssetHelper::Cut->process($safe_page);
|
||||
$output = $helper->process($safe_page);
|
||||
cmp_deeply(
|
||||
$output,
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue