|
|
|
@ -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; |
|
|
|
|