use of org.springframework.security.test.web.reactive.server.WebTestHandler in project spring-security by spring-projects.
the class HttpHeaderWriterWebFilterTests method filterWhenNotCompleteThenNotWritten.
@Test
public void filterWhenNotCompleteThenNotWritten() {
WebTestHandler handler = WebTestHandler.bindToWebFilters(this.filter);
WebHandlerResult result = handler.exchange(MockServerHttpRequest.get("/foo"));
verify(this.writer, never()).writeHttpHeaders(any());
result.getExchange().getResponse().setComplete().block();
verify(this.writer).writeHttpHeaders(any());
}
Aggregations