You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current API for MockRestServiceServer and MockRestRequestMatchers does not allow a test to validate that a certain header value does not exist. Trying to do
Unfortunately, I don't see any workaround for this until spring-test supports it. I was forced to use Mockito ArgumentCaptors in order to verify this requirement, but that meant that I couldn't use MockRestServiceServer.
using Spring Boot release version 1.5.22 (spring framework 4.3.25) and could not find how to validate if a request header does not exist in MockRestRequestMatchers.
John Mark opened SPR-10771 and commented
The current API for MockRestServiceServer and MockRestRequestMatchers does not allow a test to validate that a certain header value does not exist. Trying to do
does not work because it requires the header to first exist, and then checks the Matcher. I would like to be able to so something like this:
or something to that effect.
Unfortunately, I don't see any workaround for this until spring-test supports it. I was forced to use Mockito ArgumentCaptors in order to verify this requirement, but that meant that I couldn't use MockRestServiceServer.
Affects: 3.2.3
Referenced from: commits 4bf5a02
The text was updated successfully, but these errors were encountered: