From bf0c95d9108b1445eb2bc13b813480e0d5245ba6 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 21 Jan 2010 20:52:21 -0800 Subject: [PATCH] Update test for changes in Asset.pm --- t/Asset.t | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/t/Asset.t b/t/Asset.t index e7c315026..c60d7a4f2 100644 --- a/t/Asset.t +++ b/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'; }