Update test for changes in Asset.pm
This commit is contained in:
parent
143e2e0d7b
commit
bf0c95d910
1 changed files with 5 additions and 5 deletions
10
t/Asset.t
10
t/Asset.t
|
|
@ -19,6 +19,7 @@ use WebGUI::Test;
|
|||
use Test::More;
|
||||
use Test::Deep;
|
||||
use Test::Exception;
|
||||
use WebGUI::Exception;
|
||||
|
||||
plan tests => 50;
|
||||
|
||||
|
|
@ -137,8 +138,6 @@ my $session = WebGUI::Test->session;
|
|||
is $class, 'WebGUI::Asset', '... cache check';
|
||||
$class = WebGUI::Asset->getClassById($session, 'PBasset000000000000002');
|
||||
is $class, 'WebGUI::Asset::Wobject::Folder', '... retrieve another class';
|
||||
$class = WebGUI::Asset->getClassById($session, 'noIdHereBoss');
|
||||
is $class, undef, '... returns undef if the class cannot be found';
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -270,7 +269,8 @@ my $session = WebGUI::Test->session;
|
|||
}
|
||||
|
||||
{
|
||||
note "calling new with no assetId";
|
||||
my $asset = WebGUI::Asset->new($session, '');
|
||||
is $asset, undef, 'new returns undef without an assetId';
|
||||
note "calling new with no assetId throws an exception";
|
||||
my $asset = eval { WebGUI::Asset->new($session, ''); };
|
||||
my $e = Exception::Class->caught;
|
||||
isa_ok $e, 'WebGUI::Error';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue