Skip to content

Commit

Permalink
Convert to the correct kind of helper syntax for Fork work.
Browse files Browse the repository at this point in the history
  • Loading branch information
perlDreamer committed Oct 19, 2011
1 parent 50616de commit 19b6f9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/AssetHelper/Product/ImportCSV.t
Expand Up @@ -53,7 +53,7 @@ my $helper = WebGUI::AssetHelper::Product::ImportCSV->new(
);
my $importProducts = \&WebGUI::AssetHelper::Product::ImportCSV::importProducts;
my $process = Test::MockObject::Extends->new( WebGUI::Fork->create( $session ) );
addToCleanup( sub { $process->delete } );
WebGUI::Test->addToCleanup( sub { $process->delete } );

eval { $importProducts->( $process, { assetId => $helper->asset->getId } ); };
my $e = Exception::Class->caught();
Expand Down Expand Up @@ -83,7 +83,7 @@ SKIP: {

chmod oct(0000), $productsTempFile;

eval { $shelf->importProducts($productsTempFile); };
eval { $shelf->importProducts($process, { assetId => $helper->asset->getId, filePath => $productsTempFile } ); };
$e = Exception::Class->caught();
isa_ok($e, 'WebGUI::Error::InvalidFile', 'importProducts: error handling for file that cannot be read') || skip 'invalid error thrown', 2;
is($e->error, 'File is not readable', 'importProducts: error handling for file that that cannot be read');
Expand Down

0 comments on commit 19b6f9d

Please sign in to comment.