WebGraphQlTester allows charset in response MediaType
Closes gh-247
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user