diff --git a/spring-test/src/main/java/org/springframework/test/web/reactive/server/CookieAssertions.java b/spring-test/src/main/java/org/springframework/test/web/reactive/server/CookieAssertions.java index 0745ef7d7f..26b28b486a 100644 --- a/spring-test/src/main/java/org/springframework/test/web/reactive/server/CookieAssertions.java +++ b/spring-test/src/main/java/org/springframework/test/web/reactive/server/CookieAssertions.java @@ -188,7 +188,7 @@ public class CookieAssertions { public WebTestClient.ResponseSpec httpOnly(String name, boolean expected) { boolean isHttpOnly = getCookie(name).isHttpOnly(); this.exchangeResult.assertWithDiagnostics(() -> { - String message = getMessage(name) + " secure"; + String message = getMessage(name) + " httpOnly"; AssertionErrors.assertEquals(message, expected, isHttpOnly); }); return this.responseSpec; @@ -200,7 +200,7 @@ public class CookieAssertions { public WebTestClient.ResponseSpec sameSite(String name, String expected) { String sameSite = getCookie(name).getSameSite(); this.exchangeResult.assertWithDiagnostics(() -> { - String message = getMessage(name) + " secure"; + String message = getMessage(name) + " sameSite"; AssertionErrors.assertEquals(message, expected, sameSite); }); return this.responseSpec;