WebGraphQlTester allows charset in response MediaType

Closes gh-247
This commit is contained in:
rstoyanchev
2022-01-06 16:24:45 +00:00
parent 3df738e8a2
commit c9d41ce955
2 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -66,7 +66,7 @@ final class WebTestClientRequestStrategy extends RequestStrategySupport implemen
.expectStatus()
.isOk()
.expectHeader()
.contentType(MediaType.APPLICATION_JSON)
.contentTypeCompatibleWith(MediaType.APPLICATION_JSON)
.expectBody()
.returnResult();

View File

@@ -211,7 +211,7 @@ public class WebGraphQlTesterTests {
sb.append("}");
MockResponse response = new MockResponse();
response.setHeader("Content-Type", "application/json");
response.setHeader("Content-Type", "application/json;charset=UTF-8"); // charset should be ignored if present
response.setBody(sb.toString());
this.server.enqueue(response);