test reports errors without crashing

This commit is contained in:
JT Smith 2008-06-12 23:47:42 +00:00
parent 1acca9fa47
commit 42ed751694

View file

@ -20,7 +20,7 @@ use Data::Dumper;
use WebGUI::Test; use WebGUI::Test;
use WebGUI::Session; use WebGUI::Session;
use Test::More tests => 19; # increment this value for each test you create use Test::More tests => 20; # increment this value for each test you create
use WebGUI::Asset::Wobject::SyndicatedContent; use WebGUI::Asset::Wobject::SyndicatedContent;
my $session = WebGUI::Test->session; my $session = WebGUI::Test->session;
@ -120,10 +120,9 @@ my $url = $syndicated_content->_createRSSURLs(\%var);
ok($url,"A URL was created for RSS feed"); ok($url,"A URL was created for RSS feed");
# processTemplate, this is where we run into trouble... # processTemplate, this is where we run into trouble...
my $processed_template = $syndicated_content->processTemplate(\%var,undef,$template); my $processed_template = eval {$syndicated_content->processTemplate(\%var,undef,$template) };
ok($processed_template, "A response was received from processTemplate."); ok($processed_template, "A response was received from processTemplate.");
END { END {
# Clean up after thy self # Clean up after thy self
$versionTag->rollback(); $versionTag->rollback();