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(@fixIdTests)
|
||||||
+ scalar(@fixTitleTests)
|
+ scalar(@fixTitleTests)
|
||||||
+ 2*scalar(@getTitleTests) #same tests used for getTitle and getMenuTitle
|
+ 2*scalar(@getTitleTests) #same tests used for getTitle and getMenuTitle
|
||||||
|
|
@ -367,7 +367,6 @@ $getTitleAsset->commit;
|
||||||
|
|
||||||
$versionTag->commit;
|
$versionTag->commit;
|
||||||
|
|
||||||
my $origUrlExtension = $session->setting->get('urlExtension');
|
|
||||||
$session->setting->set('urlExtension', undef);
|
$session->setting->set('urlExtension', undef);
|
||||||
|
|
||||||
is($importNode->fixUrl('1234'.'-'x235 . 'abcdefghij'), '1234'.'-'x235 . 'abcdefghij', 'fixUrl leaves long URLs under 250 characters alone');
|
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');
|
is($fixUrlAsset5->fixUrl(), 'home/fix-url-folder-url-autogenerated', 'fixUrl will autogenerate a url if not provided one');
|
||||||
|
|
||||||
TODO: {
|
# Automatic extension adding
|
||||||
local $TODO = "Test the automatic adding of extensions to URLs";
|
$session->setting->set('urlExtension', 'html');
|
||||||
$session->setting->set('urlExtension', 'html');
|
is($importNode->fixUrl('fixurl'), 'fixurl.html', 'Automatic adding of extensions works');
|
||||||
ok(0, "Setup test for adding URL extensions");
|
is($importNode->fixUrl('fixurl.css'), 'fixurl.css', 'extensions aren\'t automatically added if there is already and extension');
|
||||||
|
$session->setting->set('urlExtension', undef);
|
||||||
$session->setting->set('urlExtension', $origUrlExtension);
|
|
||||||
}
|
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue