From 411ff8450fbf386b5a88f01777ab1e49aaa33a8d Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Fri, 18 Mar 2016 13:24:10 -0500 Subject: [PATCH] Refine tests for SPR-14066 Explicitly define the response type as text/plain to avoid content type confusion. Issue SPR-14066 --- .../test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java | 2 +- .../htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java index c8e4b09600..dabaa5c851 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java @@ -139,7 +139,7 @@ public class MockMvcWebClientBuilderTests { @RestController static class CookieController { - @RequestMapping("/") + @RequestMapping(value="/", produces="text/plain") public String cookie(@CookieValue("cookie") String cookie) { return cookie; } diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java index ed79749b19..dfb1da856e 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java @@ -158,7 +158,7 @@ public class MockMvcHtmlUnitDriverBuilderTests { @RestController static class CookieController { - @RequestMapping("/") + @RequestMapping(value="/", produces="text/plain") public String cookie(@CookieValue("cookie") String cookie) { return cookie; }