Add test to ensure 404 when wwwroot not set
This commit is contained in:
parent
a7a6a90f1d
commit
943ba9f47e
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue