Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: f6067485d3
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (31 sloc) 0.899 kB
using System.Collections.Generic;
using MbUnit.Framework;
using NBlog.Web.Application.Infrastructure;
namespace NBlog.Tests
{
[TestFixture]
public class SlugTests
{
[Test]
public void ToSlugUrl_Should_Build_Correct_Slugs()
{
// arrange
var slugs = new Dictionary<string, string>
{
{"myentry", "myentry"},
{"my-entry", "my-entry"},
{"MyEntry", "myentry"},
{"my entry", "my-entry"},
{" my entry ", "my-entry"},
{"my<script></script>entry", "my-script-script-entry"},
{">my.'& entry*?", "my-entry"}
};
// act
foreach (var slug in slugs)
{
// assert
Assert.AreEqual(slug.Key.ToUrlSlug(), slug.Value);
}
}
}
}
Jump to Line
Something went wrong with that request. Please try again.