coverage and functional tests for getIcon
This commit is contained in:
parent
14f5ebdebc
commit
88b7a7c744
1 changed files with 23 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ my @fixTitleTests = (
|
|||
},
|
||||
);
|
||||
|
||||
plan tests => 50 + scalar(@fixIdTests) + scalar(@fixTitleTests);
|
||||
plan tests => 56 + scalar(@fixIdTests) + scalar(@fixTitleTests);
|
||||
|
||||
# Test the default constructor
|
||||
my $defaultAsset = WebGUI::Asset->getDefault($session);
|
||||
|
|
@ -350,6 +350,8 @@ TODO: {
|
|||
$session->setting->set('urlExtension', $origUrlExtension);
|
||||
}
|
||||
|
||||
$session->config->set('extrasURL', $origExtras);
|
||||
|
||||
################################################################
|
||||
#
|
||||
# fixId
|
||||
|
|
@ -382,6 +384,26 @@ $fixTitleAsset->update({'title' => 0});
|
|||
|
||||
is($fixTitleAsset->fixTitle(''), 'Untitled', q{fixTitle: title is false, fixTitle returns 'Untitled'});
|
||||
|
||||
################################################################
|
||||
#
|
||||
# getIcon
|
||||
#
|
||||
################################################################
|
||||
|
||||
like($importNode->getIcon, qr{folder.gif$}, 'getIcon gets correct icon for importNode');
|
||||
like($importNode->getIcon(1), qr{small/folder.gif$}, 'getIcon gets small icon for importNode');
|
||||
|
||||
like($importNode->getIcon(), qr{$origExtras}, 'getIcon returns an icon from the extras URL');
|
||||
|
||||
like($defaultAsset->getIcon, qr{layout.gif$}, 'getIcon gets icon for a layout');
|
||||
like($fixTitleAsset->getIcon, qr{snippet.gif$}, 'getIcon gets icon for a snippet');
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO = "Coverage test";
|
||||
ok(0, "Test the default name for the icon, if not given in the definition sub");
|
||||
}
|
||||
|
||||
END: {
|
||||
$session->config->set('extrasURL', $origExtras);
|
||||
$session->config->set('uploadsURL', $origUploads);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue