mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 02:44:52 +08:00
A little more Routable path & slug bug fixing and cleanup
--HG-- branch : dev
This commit is contained in:
@@ -63,7 +63,7 @@ namespace Orchard.Core.Tests.Common.Services {
|
||||
t.Title = "Please do not use any of the following characters in your slugs: \":\", \"/\", \"?\", \"#\", \"[\", \"]\", \"@\", \"!\", \"$\", \"&\", \"'\", \"(\", \")\", \"*\", \"+\", \",\", \";\", \"=\"";
|
||||
});
|
||||
|
||||
_routableService.FillSlug(thing.As<RoutePart>());
|
||||
_routableService.FillSlugFromTitle(thing.As<RoutePart>());
|
||||
|
||||
Assert.That(thing.Slug, Is.EqualTo("please-do-not-use-any-of-the-following-characters-in-your-slugs-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\"-\""));
|
||||
}
|
||||
@@ -93,7 +93,7 @@ namespace Orchard.Core.Tests.Common.Services {
|
||||
veryVeryLongTitle += "aaaaaaaaaa";
|
||||
|
||||
var thing = CreateRoutePart(veryVeryLongTitle);
|
||||
_routableService.FillSlug(thing);
|
||||
_routableService.FillSlugFromTitle(thing);
|
||||
|
||||
Assert.That(veryVeryLongTitle.Length, Is.AtLeast(1001));
|
||||
Assert.That(thing.Slug.Length, Is.EqualTo(1000));
|
||||
@@ -139,7 +139,7 @@ namespace Orchard.Core.Tests.Common.Services {
|
||||
public void GeneratedSlugIsLowerCased() {
|
||||
var thing = CreateRoutePart("This Is Some Interesting Title");
|
||||
|
||||
_routableService.FillSlug(thing);
|
||||
_routableService.FillSlugFromTitle(thing);
|
||||
|
||||
Assert.That(thing.Slug, Is.EqualTo("this-is-some-interesting-title"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user