parent
89c94d0823
commit
f3ffdada95
|
|
@ -36,8 +36,8 @@ namespace Microsoft.AspNetCore.Mvc.Internal
|
|||
new BadRequestObjectResult(modelState) :
|
||||
new BadRequestObjectResult(errorDetails);
|
||||
|
||||
result.ContentTypes.Add("application/problem+json");
|
||||
result.ContentTypes.Add("application/problem+json");
|
||||
result.ContentTypes.Add("application/json");
|
||||
result.ContentTypes.Add("application/xml");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
|
|||
|
||||
// Assert
|
||||
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
|
||||
Assert.Equal("application/problem+json", response.Content.Headers.ContentType.MediaType);
|
||||
Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType);
|
||||
var actual = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(await response.Content.ReadAsStringAsync());
|
||||
Assert.Collection(
|
||||
actual.OrderBy(kvp => kvp.Key),
|
||||
|
|
|
|||
Loading…
Reference in New Issue