public async Task PostNewFieldReturnsBadRequestAndCorrectContentType() { // Given CreateFieldViewModel model = ViewModelFactory.CreateInvalidCreationModel(); // When HttpResponseMessage response = await Client.PostAsJsonAsync(EndPointFactory.CreateEndpoint(), model); // Then response.StatusCode.Should().Be(HttpStatusCode.BadRequest); response.Content.Headers.ContentType.ToString().Should().Be("application/problem+json; charset=utf-8"); }