add a tests to plug a coverage holes in default subroutine arguments

This commit is contained in:
Colin Kuskie 2006-10-11 05:04:44 +00:00
parent a86c34df84
commit e876e77b18

View file

@ -19,7 +19,7 @@ use WebGUI::Asset;
use WebGUI::VersionTag;
use WebGUI;
use Test::More tests => 44; # increment this value for each test you create
use Test::More tests => 46; # increment this value for each test you create
use Test::Deep;
my $session = WebGUI::Test->session;
@ -64,6 +64,11 @@ $style->setLink('http://www.plainblack.com');
($url) = simpleLinkParser('link', $style->generateAdditionalHeadTags);
is($url, 'http://www.plainblack.com', 'setLink: called with link url');
$style->setLink('http://dev.plainblack.com', '');
($url,$params) = simpleLinkParser('link', $style->generateAdditionalHeadTags);
is($url, 'http://dev.plainblack.com', 'setLink: called with bad params');
cmp_deeply({}, $params, 'setLink: bad params sent return no params in tag');
my $setParams = {rating => 5, affiliateId => '007', CAPS => 'CapitalS'};
$style->setLink('http://www.webguidev.org', $setParams);
is($style->setLink('http://www.webguidev.org'), undef, 'setLink: returns undef if URL is passed again');