Adding a test for slugs

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2010-10-14 16:55:09 -07:00
parent a49112c177
commit ff91690cfb
2 changed files with 8 additions and 7 deletions

View File

@@ -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