mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 02:44:52 +08:00
Adding a test for slugs
--HG-- branch : dev
This commit is contained in:
@@ -84,6 +84,13 @@ namespace Orchard.Core.Tests.Routable.Services {
|
||||
Assert.That(_routableService.IsSlugValid("some/page"), Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DotsAroundSlugAreAllowed() {
|
||||
Assert.That(_routableService.IsSlugValid(".slug"), Is.False);
|
||||
Assert.That(_routableService.IsSlugValid("slug."), Is.False);
|
||||
Assert.That(_routableService.IsSlugValid("slug.slug"), Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void EmptySlugsShouldBeConsideredValid() {
|
||||
// so that automatic generation on Publish occurs
|
||||
|
Reference in New Issue
Block a user