|
|
|
@ -129,7 +129,7 @@ class SpringBootServletInitializerTests {
|
|
|
|
|
given(servletContext.getInitParameterNames())
|
|
|
|
|
.willReturn(Collections.enumeration(Collections.singletonList("spring.profiles.active")));
|
|
|
|
|
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()
|
|
|
|
|
.createRootApplicationContext(servletContext)) {
|
|
|
|
|
assertThat(context.getEnvironment().getActiveProfiles()).containsExactly("from-servlet-context");
|
|
|
|
|