Skip to content

Commit

Permalink
Update @MessageMapping to match input/output cardinality
Browse files Browse the repository at this point in the history
  • Loading branch information
eleftherias authored and rwinch committed Nov 22, 2019
1 parent cd0bec4 commit 8a95e57
Showing 1 changed file with 1 addition and 14 deletions.
Expand Up @@ -185,19 +185,6 @@ public void retrieveFluxWhenDataStringAndSecureThenDenied() throws Exception {
assertThat(this.controller.payloads).isEmpty();
}

@Test
public void retrieveFluxWhenDataStringAndPublicThenGranted() throws Exception {
String data = "a";
List<String> hi = this.requester.route("retrieve-flux")
.data(data)
.retrieveFlux(String.class)
.collectList()
.block();

assertThat(hi).contains("hello a");
assertThat(this.controller.payloads).containsOnly(data);
}

@Test
public void sendWhenSecureThenDenied() throws Exception {
String data = "hi";
Expand Down Expand Up @@ -287,7 +274,7 @@ Flux<String> retrieveFlux(Flux<String> payload) {
}

@MessageMapping({"secure.send", "send"})
Mono<Void> send(Flux<String> payload) {
Mono<Void> send(Mono<String> payload) {
return payload
.doOnNext(this::add)
.then(Mono.fromRunnable(() -> {
Expand Down

0 comments on commit 8a95e57

Please sign in to comment.