Commit e2f20991 authored by Dave Syer's avatar Dave Syer

Add test for gh-1776

parent b95e6fce
......@@ -178,6 +178,17 @@ public class SpringApplicationBuilderTests {
assertThat(this.context.getEnvironment().getProperty("bar"), is(equalTo("spam")));
}
@Test
public void parentFirstWithDifferentProfile() throws Exception {
SpringApplicationBuilder application = new SpringApplicationBuilder(
ExampleConfig.class).profiles("node").properties("transport=redis")
.child(ChildConfig.class).profiles("admin").web(false);
this.context = application.run();
assertThat(this.context.getEnvironment().acceptsProfiles("node"), is(true));
assertThat(this.context.getParent().getEnvironment().acceptsProfiles("admin"),
is(false));
}
@Test
public void parentContextIdentical() throws Exception {
SpringApplicationBuilder application = new SpringApplicationBuilder(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment