Revert "Remove dangling test workarounds for and mentions of closed bugs"

This reverts commit d26cc11e13.
This commit is contained in:
Doug Bunting 2016-01-30 00:02:57 -08:00
parent efd38a6dd1
commit 9e4f4c76cc
6 changed files with 33 additions and 19 deletions

View File

@ -4,6 +4,7 @@
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Testing.xunit;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.FunctionalTests
@ -17,7 +18,9 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
public HttpClient Client { get; }
[Fact]
[ConditionalFact]
// https://github.com/aspnet/Mvc/issues/2727
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
public async Task FileFromDisk_CanBeEnabled_WithMiddleware()
{
// Arrange & Act
@ -34,7 +37,9 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
Assert.Equal("This is a sample text file", body);
}
[Fact]
[ConditionalFact]
// https://github.com/aspnet/Mvc/issues/2727
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
public async Task FileFromDisk_ReturnsFileWithFileName()
{
// Arrange & Act

View File

@ -53,7 +53,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
// Assert
Assert.Equal(HttpStatusCode.Redirect, response.StatusCode);
// Location.ToString() in mono returns file://url. (see https://github.com/aspnet/External/issues/21)
// Location.ToString() in mono returns file://url. (https://github.com/aspnet/External/issues/21)
Assert.Equal(
TestPlatformHelper.IsMono ? new Uri(expected) : new Uri(expected, UriKind.Relative),
response.Headers.Location);

View File

@ -74,7 +74,8 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
}
[ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "aspnet/External#21, redirect scheme is file:.")]
// Mono issue - https://github.com/aspnet/External/issues/21
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
public async Task Redirect_RetainsTempData_EvenIfAccessed()
{
// Arrange
@ -139,7 +140,8 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
}
[ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "aspnet/External#21, redirect scheme is file:.")]
// Mono issue - https://github.com/aspnet/External/issues/21
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
public async Task TempData_ValidTypes_RoundTripProperly()
{
// Arrange

View File

@ -31,19 +31,20 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
[Theory]
[InlineData(null, "test.jpg", "test.jpg")]
[InlineData("abcd.jpg", "test.jpg", "test.jpg")]
[InlineData(null, "~/test.jpg", "/virtualRoot/test.jpg")]
[InlineData("abcd.jpg", "~/test.jpg", "/virtualRoot/test.jpg")]
[InlineData(null, "~/test.jpg", "virtualRoot/test.jpg")]
[InlineData("abcd.jpg", "~/test.jpg", "virtualRoot/test.jpg")]
public void Process_SrcDefaultsToTagHelperOutputSrcAttributeAddedByOtherTagHelper(
string src,
string srcOutput,
string expectedSrcPrefix)
{
// Arrange
var allAttributes = new TagHelperAttributeList
{
{ "alt", new HtmlString("Testing") },
{ "asp-append-version", true },
};
var allAttributes = new TagHelperAttributeList(
new TagHelperAttributeList
{
{ "alt", new HtmlString("Testing") },
{ "asp-append-version", true },
});
var context = MakeTagHelperContext(allAttributes);
var outputAttributes = new TagHelperAttributeList
{
@ -59,9 +60,11 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
var viewContext = MakeViewContext();
var urlHelper = new Mock<IUrlHelper>();
// Ensure expanded path does not look like an absolute path on Linux, avoiding
// https://github.com/aspnet/External/issues/21
urlHelper
.Setup(urlhelper => urlhelper.Content(It.IsAny<string>()))
.Returns(new Func<string, string>(url => url.Replace("~/", "/virtualRoot/")));
.Returns(new Func<string, string>(url => url.Replace("~/", "virtualRoot/")));
var urlHelperFactory = new Mock<IUrlHelperFactory>();
urlHelperFactory
.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))

View File

@ -35,8 +35,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
[Theory]
[InlineData(null, "test.css", "test.css")]
[InlineData("abcd.css", "test.css", "test.css")]
[InlineData(null, "~/test.css", "/virtualRoot/test.css")]
[InlineData("abcd.css", "~/test.css", "/virtualRoot/test.css")]
[InlineData(null, "~/test.css", "virtualRoot/test.css")]
[InlineData("abcd.css", "~/test.css", "virtualRoot/test.css")]
public void Process_HrefDefaultsToTagHelperOutputHrefAttributeAddedByOtherTagHelper(
string href,
string hrefOutput,
@ -60,9 +60,11 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
var viewContext = MakeViewContext();
var urlHelper = new Mock<IUrlHelper>();
// Ensure expanded path does not look like an absolute path on Linux, avoiding
// https://github.com/aspnet/External/issues/21
urlHelper
.Setup(urlhelper => urlhelper.Content(It.IsAny<string>()))
.Returns(new Func<string, string>(url => url.Replace("~/", "/virtualRoot/")));
.Returns(new Func<string, string>(url => url.Replace("~/", "virtualRoot/")));
var urlHelperFactory = new Mock<IUrlHelperFactory>();
urlHelperFactory
.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))

View File

@ -36,8 +36,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
[Theory]
[InlineData(null, "test.js", "test.js")]
[InlineData("abcd.js", "test.js", "test.js")]
[InlineData(null, "~/test.js", "/virtualRoot/test.js")]
[InlineData("abcd.js", "~/test.js", "/virtualRoot/test.js")]
[InlineData(null, "~/test.js", "virtualRoot/test.js")]
[InlineData("abcd.js", "~/test.js", "virtualRoot/test.js")]
public void Process_SrcDefaultsToTagHelperOutputSrcAttributeAddedByOtherTagHelper(
string src,
string srcOutput,
@ -61,9 +61,11 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
var viewContext = MakeViewContext();
var urlHelper = new Mock<IUrlHelper>();
// Ensure expanded path does not look like an absolute path on Linux, avoiding
// https://github.com/aspnet/External/issues/21
urlHelper
.Setup(urlhelper => urlhelper.Content(It.IsAny<string>()))
.Returns(new Func<string, string>(url => url.Replace("~/", "/virtualRoot/")));
.Returns(new Func<string, string>(url => url.Replace("~/", "virtualRoot/")));
var urlHelperFactory = new Mock<IUrlHelperFactory>();
urlHelperFactory
.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))