Adding functional test to verify error page middleware includes raw compilation content.
This commit is contained in:
parent
8f6a0fc4fa
commit
dd29d562b8
|
|
@ -74,6 +74,8 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
|
|||
// Arrange
|
||||
var expectedMessage = "The type or namespace name 'NamespaceDoesNotExist' could not be found ("
|
||||
+ "are you missing a using directive or an assembly reference?)";
|
||||
var expectedCompilationContent = "public class _Views_ErrorFromViewImports_Index_cshtml : "
|
||||
+ "Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>";
|
||||
var expectedMediaType = MediaTypeHeaderValue.Parse("text/html; charset=utf-8");
|
||||
|
||||
// Act
|
||||
|
|
@ -86,6 +88,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
|
|||
Assert.Contains("/Views/ErrorFromViewImports/_ViewImports.cshtml", content);
|
||||
Assert.Contains(expectedMessage, content);
|
||||
Assert.Contains(PreserveCompilationContextMessage, content);
|
||||
Assert.Contains(expectedCompilationContent, content);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
Loading…
Reference in New Issue