"the old API was to pass the asset into process(), but that had some problems" according to preaction, re: WebGUI::AssetHelper::Cut->new now requiring an asset parameter.
fixes www_processAssetHelper test; several others in there still fail for me. this fix fixes a WebGUI::Fork leak. I'm sure there are more.
This commit is contained in:
parent
ee212a16f3
commit
5b5a7e9124
1 changed files with 9 additions and 3 deletions
12
t/Admin.t
12
t/Admin.t
|
|
@ -70,6 +70,8 @@ my $snip = $import->addChild( {
|
|||
$snip->commit;
|
||||
addToCleanup( $snip );
|
||||
|
||||
ok(WebGUI::Test->waitForAllForks(10), "... Forks finished");
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
|
||||
|
|
@ -82,12 +84,15 @@ $mech->session->user({ userId => '3' });
|
|||
|
||||
# www_processAssetHelper
|
||||
$mech->get_ok( '/?op=admin;method=processAssetHelper;helperId=cut;assetId=' . $snip->getId );
|
||||
cmp_deeply(
|
||||
JSON->new->decode( $mech->content ),
|
||||
WebGUI::AssetHelper::Cut->new( id => 'cut', session => $session )->process( $snip ),
|
||||
|
||||
cmp_deeply(
|
||||
map( { delete $_->{forkId}; $_ } JSON->new->decode( $mech->content )),
|
||||
map( { delete $_->{forkId}; $_ } WebGUI::AssetHelper::Cut->new( id => 'cut', session => $session, asset => $snip )->process( )),
|
||||
'www_processAssetHelper',
|
||||
);
|
||||
|
||||
ok(WebGUI::Test->waitForAllForks(10), "... Forks finished");
|
||||
|
||||
# www_processPlugin
|
||||
$mech->get_ok( '/?op=admin;method=processPlugin;id=test' );
|
||||
$output = $mech->content;
|
||||
|
|
@ -237,6 +242,7 @@ cmp_deeply(
|
|||
'www_searchAssets',
|
||||
);
|
||||
|
||||
ok(WebGUI::Test->waitForAllForks(10), "Forks finished");
|
||||
|
||||
done_testing;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue