Skip to content

Commit 411ff84

Browse files
author
Rob Winch
committed
Refine tests for SPR-14066
Explicitly define the response type as text/plain to avoid content type confusion. Issue SPR-14066
1 parent e2ba477 commit 411ff84

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public String contextPath(HttpServletRequest request) {
139139

140140
@RestController
141141
static class CookieController {
142-
@RequestMapping("/")
142+
@RequestMapping(value="/", produces="text/plain")
143143
public String cookie(@CookieValue("cookie") String cookie) {
144144
return cookie;
145145
}

spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public String contextPath(HttpServletRequest request) {
158158

159159
@RestController
160160
static class CookieController {
161-
@RequestMapping("/")
161+
@RequestMapping(value="/", produces="text/plain")
162162
public String cookie(@CookieValue("cookie") String cookie) {
163163
return cookie;
164164
}

0 commit comments

Comments
 (0)