From cda2c6781c3f72f490b1f004ce3efc835662e0b8 Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Thu, 4 Jun 2015 22:43:43 -0700 Subject: [PATCH] Use stable locale when testing date/time formats - `CultureReplacerMiddleware` no longer helping `RazorWebSite` - regressed with @30d11a8 - `[ReplaceCulture]` sets up the correct culture early enough for consistent formatting - remove `CultureReplacerMiddleware` from `RazorWebSite` - only `Startup` class we have that used this with `RequestLocalizationMiddleware` - testing `RequestLocalizationMiddleware`; so remove the confusing extra middleware --- .../HtmlHelperOptionsTest.cs | 6 ++++-- test/WebSites/RazorWebSite/Startup.cs | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/HtmlHelperOptionsTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/HtmlHelperOptionsTest.cs index 529b5bb145..f6c4a31093 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/HtmlHelperOptionsTest.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/HtmlHelperOptionsTest.cs @@ -4,6 +4,7 @@ using System; using System.Threading.Tasks; using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Testing; using Microsoft.Framework.DependencyInjection; using RazorWebSite; using Xunit; @@ -50,6 +51,7 @@ False"; } [Fact] + [ReplaceCulture] public async Task OverrideAppWideDefaultsInViewAndPartialView() { // Arrange @@ -60,7 +62,7 @@ False"; An error occurred.
-
+
True @@ -70,7 +72,7 @@ True An error occurred.
-
+
True"; diff --git a/test/WebSites/RazorWebSite/Startup.cs b/test/WebSites/RazorWebSite/Startup.cs index 2cd20e28a7..1381522a5a 100644 --- a/test/WebSites/RazorWebSite/Startup.cs +++ b/test/WebSites/RazorWebSite/Startup.cs @@ -37,8 +37,6 @@ namespace RazorWebSite public void Configure(IApplicationBuilder app) { - app.UseCultureReplacer(); - app.UseRequestLocalization(); // Add MVC to the request pipeline