@ -146,22 +146,22 @@ public class EndpointWebMvcAutoConfigurationTests {
@@ -146,22 +146,22 @@ public class EndpointWebMvcAutoConfigurationTests {
assertContent ( "/controller" , ports . get ( ) . management , null ) ;
assertContent ( "/endpoint" , ports . get ( ) . management , null ) ;
assertThat ( hasHeader ( "/endpoint" , ports . get ( ) . server , "X-Application-Context" ) )
. isTru e ( ) ;
. isFals e ( ) ;
assertThat ( this . applicationContext . containsBean ( "applicationContextIdFilter" ) )
. isTru e ( ) ;
. isFals e ( ) ;
}
@Test
public void onSamePortWithout Header ( ) throws Exception {
public void onSamePortWithHeader ( ) throws Exception {
EnvironmentTestUtils . addEnvironment ( this . applicationContext ,
"management.add-application-context-header:fals e" ) ;
"management.add-application-context-header:tru e" ) ;
this . applicationContext . register ( RootConfig . class , EndpointConfig . class ,
BaseConfiguration . class , EndpointWebMvcAutoConfiguration . class ) ;
this . applicationContext . refresh ( ) ;
assertThat ( hasHeader ( "/endpoint" , ports . get ( ) . server , "X-Application-Context" ) )
. isFals e ( ) ;
. isTru e ( ) ;
assertThat ( this . applicationContext . containsBean ( "applicationContextIdFilter" ) )
. isFals e ( ) ;
. isTru e ( ) ;
}
@Test