Polish ExchangeMutatorWebFilter Support

Issue gh-4343
This commit is contained in:
Rob Winch
2017-05-30 22:44:56 -05:00
parent 6aa7f05579
commit 915de03f42
3 changed files with 19 additions and 20 deletions

View File

@@ -161,16 +161,17 @@ public class HelloWebfluxApplicationTests {
@Test
public void mockSupport() throws Exception {
ExchangeMutatorWebFilter exchangeMutator = new ExchangeMutatorWebFilter(withUser());
ExchangeMutatorWebFilter exchangeMutator = new ExchangeMutatorWebFilter();
WebTestClient mockRest = WebTestClient.bindToApplicationContext(this.context).webFilter(exchangeMutator).build();
mockRest
.filter(exchangeMutator.perClient(withUser()))
.get()
.uri("/principal")
.exchange()
.expectStatus().isOk();
this.rest
mockRest
.get()
.uri("/principal")
.exchange()