SpringSource/spring-test-mvc — pull request #27 by tbruyelle (2012-03-13 13:18:37+00:00)
Title: Extend CookieResultMatchers

I added some methods to `CookieResultMatchers`, I think they can be useful when testing a cookie.

* `exists()`, `doesNotExists()` : check if a cookie exists and/or is not expired. I don't think we need to make a distinction between a cookie does not exist and is expired. Afaik, from a browser, there is no difference.
* `maxAge()` : checks the cookie max age, also add a shortcut `scopeSession` which checks if the max age is negative.
* `version()`, `domain()`, `path()`, `comment()`, `secured()`, `notSecured()` : checks the corresponding cookie attributes.

I also added some tests in `CookieResultMatherTests`.

Regards