Polish "Stop configuring a default user with SAML 2.0 Login"

See gh-29263
pull/29975/head
Stephane Nicoll 3 years ago
parent ab49acc782
commit e92e35d56f

@ -159,7 +159,9 @@ class UserDetailsServiceAutoConfigurationTests {
@Test
void userDetailsServiceWhenRelyingPartyRegistrationRepositoryBeanPresent() {
this.contextRunner.withUserConfiguration(TestConfigWithRelyingPartyRegistrationRepository.class)
this.contextRunner
.withBean(RelyingPartyRegistrationRepository.class,
() -> mock(RelyingPartyRegistrationRepository.class))
.run(((context) -> assertThat(context).doesNotHaveBean(InMemoryUserDetailsManager.class)));
}
@ -241,17 +243,6 @@ class UserDetailsServiceAutoConfigurationTests {
}
@Configuration(proxyBeanMethods = false)
@Import(TestSecurityConfiguration.class)
static class TestConfigWithRelyingPartyRegistrationRepository {
@Bean
RelyingPartyRegistrationRepository relyingPartyRegistrationRepository() {
return mock(RelyingPartyRegistrationRepository.class);
}
}
@Configuration(proxyBeanMethods = false)
@Import(TestSecurityConfiguration.class)
static class TestConfigWithJwtDecoder {

Loading…
Cancel
Save