add tests for url extensions
This commit is contained in:
parent
4853206ede
commit
39127b7ec0
1 changed files with 6 additions and 9 deletions
|
|
@ -153,7 +153,7 @@ $canViewMaker->prepare(
|
|||
},
|
||||
);
|
||||
|
||||
plan tests => 112
|
||||
plan tests => 113
|
||||
+ scalar(@fixIdTests)
|
||||
+ scalar(@fixTitleTests)
|
||||
+ 2*scalar(@getTitleTests) #same tests used for getTitle and getMenuTitle
|
||||
|
|
@ -367,7 +367,6 @@ $getTitleAsset->commit;
|
|||
|
||||
$versionTag->commit;
|
||||
|
||||
my $origUrlExtension = $session->setting->get('urlExtension');
|
||||
$session->setting->set('urlExtension', undef);
|
||||
|
||||
is($importNode->fixUrl('1234'.'-'x235 . 'abcdefghij'), '1234'.'-'x235 . 'abcdefghij', 'fixUrl leaves long URLs under 250 characters alone');
|
||||
|
|
@ -412,13 +411,11 @@ is($importNode->fixUrl('fixUrlFolderURL100'), 'fixurlfolderurl101', '100->101');
|
|||
|
||||
is($fixUrlAsset5->fixUrl(), 'home/fix-url-folder-url-autogenerated', 'fixUrl will autogenerate a url if not provided one');
|
||||
|
||||
TODO: {
|
||||
local $TODO = "Test the automatic adding of extensions to URLs";
|
||||
$session->setting->set('urlExtension', 'html');
|
||||
ok(0, "Setup test for adding URL extensions");
|
||||
|
||||
$session->setting->set('urlExtension', $origUrlExtension);
|
||||
}
|
||||
# Automatic extension adding
|
||||
$session->setting->set('urlExtension', 'html');
|
||||
is($importNode->fixUrl('fixurl'), 'fixurl.html', 'Automatic adding of extensions works');
|
||||
is($importNode->fixUrl('fixurl.css'), 'fixurl.css', 'extensions aren\'t automatically added if there is already and extension');
|
||||
$session->setting->set('urlExtension', undef);
|
||||
|
||||
################################################################
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue