Remove dangling test workarounds for and mentions of closed bugs

- not all aspnet/External#21 workarounds are needed
- no need to work around aspnet/Mvc#2727
This commit is contained in:
Doug Bunting 2016-01-04 11:54:41 -08:00
parent faba95287e
commit d26cc11e13
6 changed files with 19 additions and 33 deletions

View File

@ -4,7 +4,6 @@
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Testing.xunit;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.FunctionalTests
@ -18,9 +17,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
public HttpClient Client { get; }
[ConditionalFact]
// https://github.com/aspnet/Mvc/issues/2727
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
[Fact]
public async Task FileFromDisk_CanBeEnabled_WithMiddleware()
{
// Arrange & Act
@ -37,9 +34,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
Assert.Equal("This is a sample text file", body);
}
[ConditionalFact]
// https://github.com/aspnet/Mvc/issues/2727
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
[Fact]
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. (https://github.com/aspnet/External/issues/21)
// Location.ToString() in mono returns file://url. (see 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,8 +74,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
}
[ConditionalFact]
// Mono issue - https://github.com/aspnet/External/issues/21
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "aspnet/External#21, redirect scheme is file:.")]
public async Task Redirect_RetainsTempData_EvenIfAccessed()
{
// Arrange
@ -140,8 +139,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
}
[ConditionalFact]
// Mono issue - https://github.com/aspnet/External/issues/21
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
[FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "aspnet/External#21, redirect scheme is file:.")]
public async Task TempData_ValidTypes_RoundTripProperly()
{
// Arrange

View File

@ -31,20 +31,19 @@ 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(
new TagHelperAttributeList
{
{ "alt", new HtmlString("Testing") },
{ "asp-append-version", true },
});
var allAttributes = new TagHelperAttributeList
{
{ "alt", new HtmlString("Testing") },
{ "asp-append-version", true },
};
var context = MakeTagHelperContext(allAttributes);
var outputAttributes = new TagHelperAttributeList
{
@ -60,11 +59,9 @@ 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,11 +60,9 @@ 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,11 +61,9 @@ 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>()))