mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 09:12:14 +00:00
Polish ReactorContextTestExecutionListenerTests
Necessary for preparing for the changes that will be made. The Context should not necessarily be empty, but it should not contain the SecurityContext Issue gh-4718
This commit is contained in:
parent
3abec60188
commit
9363e2ba41
@ -60,7 +60,11 @@ public class ReactorContextTestExecutionListenerTests {
|
||||
public void beforeTestMethodWhenSecurityContextEmptyThenReactorContextNull() throws Exception {
|
||||
this.listener.beforeTestMethod(this.testContext);
|
||||
|
||||
assertThat(Mono.subscriberContext().block().isEmpty()).isTrue();
|
||||
Mono<?> result = ReactiveSecurityContextHolder
|
||||
.getContext();
|
||||
|
||||
StepVerifier.create(result)
|
||||
.verifyComplete();
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -69,9 +73,12 @@ public class ReactorContextTestExecutionListenerTests {
|
||||
|
||||
this.listener.beforeTestMethod(this.testContext);
|
||||
|
||||
assertThat(Mono.subscriberContext().block().isEmpty()).isTrue();
|
||||
}
|
||||
Mono<?> result = ReactiveSecurityContextHolder
|
||||
.getContext();
|
||||
|
||||
StepVerifier.create(result)
|
||||
.verifyComplete();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void beforeTestMethodWhenAuthenticationThenReactorContextHasAuthentication() throws Exception {
|
||||
|
Loading…
x
Reference in New Issue
Block a user