mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-01 09:42:13 +00:00
Update @MessageMapping to match input/output cardinality
This commit is contained in:
parent
cd0bec48de
commit
8a95e5798d
@ -185,19 +185,6 @@ public class RSocketMessageHandlerITests {
|
|||||||
assertThat(this.controller.payloads).isEmpty();
|
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
|
@Test
|
||||||
public void sendWhenSecureThenDenied() throws Exception {
|
public void sendWhenSecureThenDenied() throws Exception {
|
||||||
String data = "hi";
|
String data = "hi";
|
||||||
@ -287,7 +274,7 @@ public class RSocketMessageHandlerITests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@MessageMapping({"secure.send", "send"})
|
@MessageMapping({"secure.send", "send"})
|
||||||
Mono<Void> send(Flux<String> payload) {
|
Mono<Void> send(Mono<String> payload) {
|
||||||
return payload
|
return payload
|
||||||
.doOnNext(this::add)
|
.doOnNext(this::add)
|
||||||
.then(Mono.fromRunnable(() -> {
|
.then(Mono.fromRunnable(() -> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user