|
|
@ -129,7 +129,7 @@ class SpringBootServletInitializerTests {
|
|
|
|
given(servletContext.getInitParameterNames())
|
|
|
|
given(servletContext.getInitParameterNames())
|
|
|
|
.willReturn(Collections.enumeration(Collections.singletonList("spring.profiles.active")));
|
|
|
|
.willReturn(Collections.enumeration(Collections.singletonList("spring.profiles.active")));
|
|
|
|
given(servletContext.getInitParameter("spring.profiles.active")).willReturn("from-servlet-context");
|
|
|
|
given(servletContext.getInitParameter("spring.profiles.active")).willReturn("from-servlet-context");
|
|
|
|
given(servletContext.getAttributeNames()).willReturn(Collections.enumeration(Collections.emptyList()));
|
|
|
|
given(servletContext.getAttributeNames()).willReturn(Collections.emptyEnumeration());
|
|
|
|
try (ConfigurableApplicationContext context = (ConfigurableApplicationContext) new PropertySourceVerifyingSpringBootServletInitializer()
|
|
|
|
try (ConfigurableApplicationContext context = (ConfigurableApplicationContext) new PropertySourceVerifyingSpringBootServletInitializer()
|
|
|
|
.createRootApplicationContext(servletContext)) {
|
|
|
|
.createRootApplicationContext(servletContext)) {
|
|
|
|
assertThat(context.getEnvironment().getActiveProfiles()).containsExactly("from-servlet-context");
|
|
|
|
assertThat(context.getEnvironment().getActiveProfiles()).containsExactly("from-servlet-context");
|
|
|
|