Add test to ensure 404 when wwwroot not set

This commit is contained in:
Pavel Krymets 2015-11-30 11:01:13 -08:00
parent a7a6a90f1d
commit 943ba9f47e
1 changed files with 10 additions and 0 deletions

View File

@ -17,6 +17,16 @@ namespace Microsoft.AspNet.StaticFiles
{
public class StaticFileMiddlewareTests
{
[Fact]
public async Task ReturnsNotFoundWithoutWwwroot()
{
var server = TestServer.Create(app => app.UseStaticFiles());
var response = await server.CreateClient().GetAsync("/ranges.txt");
Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
}
[Fact]
public async Task NullArguments()
{