From daf10d6c459ea547f2a66d0e770e9e20fbad35d6 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Wed, 13 Oct 2021 14:00:29 +0200 Subject: [PATCH] Include correct keyword in CookieAssertions failure messages Closes gh-27550 --- .../test/web/reactive/server/CookieAssertions.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;