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

See gh-29263
This commit is contained in:
Stephane Nicoll 2022-01-10 16:25:43 +01:00
parent ab49acc782
commit e92e35d56f
1 changed files with 3 additions and 12 deletions

View File

@ -159,7 +159,9 @@ class UserDetailsServiceAutoConfigurationTests {
@Test @Test
void userDetailsServiceWhenRelyingPartyRegistrationRepositoryBeanPresent() { void userDetailsServiceWhenRelyingPartyRegistrationRepositoryBeanPresent() {
this.contextRunner.withUserConfiguration(TestConfigWithRelyingPartyRegistrationRepository.class) this.contextRunner
.withBean(RelyingPartyRegistrationRepository.class,
() -> mock(RelyingPartyRegistrationRepository.class))
.run(((context) -> assertThat(context).doesNotHaveBean(InMemoryUserDetailsManager.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) @Configuration(proxyBeanMethods = false)
@Import(TestSecurityConfiguration.class) @Import(TestSecurityConfiguration.class)
static class TestConfigWithJwtDecoder { static class TestConfigWithJwtDecoder {