Skip to content

Commit

Permalink
Fixing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienros committed Jan 24, 2017
1 parent 68c10bc commit 9b6c231
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,18 @@ public void IsLocalUrlShouldReturnTrueWhenAuthoritiesMatch() {
request.Headers.Add("Host", "localhost");

Assert.That(request.IsLocalUrl("http://localhost"), Is.True);
Assert.That(request.IsLocalUrl("https://localhost"), Is.True);
}

[Test]
public void IsLocalUrlShouldReturnFalseForNonHttpSchemes() {
var request = new StubHttpRequest();
request.Headers.Add("Host", "localhost");

Assert.That(request.IsLocalUrl("http://localhost"), Is.True);
Assert.That(request.IsLocalUrl("https://localhost"), Is.True);
Assert.That(request.IsLocalUrl("httpx://localhost"), Is.True);
Assert.That(request.IsLocalUrl("foo://localhost"), Is.True);
Assert.That(request.IsLocalUrl("data://localhost"), Is.True);
Assert.That(request.IsLocalUrl("data://localhost"), Is.True);
Assert.That(request.IsLocalUrl("httpx://localhost"), Is.False);
Assert.That(request.IsLocalUrl("foo://localhost"), Is.False);
Assert.That(request.IsLocalUrl("data://localhost"), Is.False);
Assert.That(request.IsLocalUrl("mailto://localhost"), Is.False);
}

[Test]
Expand Down

0 comments on commit 9b6c231

Please sign in to comment.