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