From f3769d6420b29acc12a133e1f36f27933d64f836 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 10 Jun 2010 19:07:48 -0700 Subject: [PATCH] Fix the UsersOnline test. Interesting failure. Calling new on the assetId caused the template to fail. I think this is due to priming the cache with the asset data as an Asset, instead of as a Template. --- t/Macro/UsersOnline.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/Macro/UsersOnline.t b/t/Macro/UsersOnline.t index 613ef9717..626f8ca62 100644 --- a/t/Macro/UsersOnline.t +++ b/t/Macro/UsersOnline.t @@ -22,6 +22,7 @@ use WebGUI::User; use WebGUI::Macro::UsersOnline; use Test::More; # increment this value for each test you create +use Test::Exception; my $session = WebGUI::Test->session; @@ -34,8 +35,7 @@ plan tests => 30; # Basic testing ----------------------------------------------------------- # Check for default template -my $defTemplate = WebGUI::Asset->new($session, 'h_T2xtOxGRQ9QJOR6ebLpQ'); -ok(defined $defTemplate, 'default template is present'); +lives_ok { WebGUI::Asset->newById($session, 'h_T2xtOxGRQ9QJOR6ebLpQ'); }, 'default template is present'; # Call with default values my $html = WebGUI::Macro::UsersOnline::process($session);