spring-framework / org.springframework.test.web.servlet.result / HeaderResultMatchers / dateValue

dateValue

open fun dateValue(name: String, value: Long): ResultMatcher

Assert the primary value of the named response header as a date String, using the preferred date format described in RFC 7231.

The ResultMatcher returned by this method throws an AssertionError if the response does not contain the specified header, or if the supplied value does not match the primary value.

See Also
<a href="https://tools.ietf.org/html/rfc7231#section-7.1.1.1">Section 7.1.1.1 of RFC 7231</a>

Since
4.2