Browse Source

Include correct keyword in CookieAssertions failure messages

Closes gh-27550
pull/27560/head
Koen Punt 3 years ago committed by GitHub
parent
commit
daf10d6c45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      spring-test/src/main/java/org/springframework/test/web/reactive/server/CookieAssertions.java

4
spring-test/src/main/java/org/springframework/test/web/reactive/server/CookieAssertions.java

@ -188,7 +188,7 @@ public class CookieAssertions { @@ -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 { @@ -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;

Loading…
Cancel
Save