Aligned exception message for httpOnly

Issue: SPR-15488
This commit is contained in:
Juergen Hoeller
2017-04-27 21:32:11 +02:00
parent baa7b1c6c8
commit 04f0f137e6
2 changed files with 9 additions and 3 deletions

View File

@@ -199,12 +199,13 @@ public class CookieResultMatchers {
}
/**
* Assert whether the cookie must be httpOnly.
* Assert whether the cookie must be HTTP only.
* @since 4.3.9
*/
public ResultMatcher httpOnly(final String name, final boolean httpOnly) {
return result -> {
Cookie cookie = result.getResponse().getCookie(name);
assertEquals("Response cookie httpOnly", httpOnly, cookie.isHttpOnly());
assertEquals("Response cookie '" + name + "' httpOnly", httpOnly, cookie.isHttpOnly());
};
}