Commit a615693f authored by Dave Syer's avatar Dave Syer

Add test for gh-645

parent 708d5ade
......@@ -318,6 +318,17 @@ public class ConfigFileApplicationListenerTests {
assertThat(property, equalTo("notempty"));
}
@Test
public void yamlTwoProfiles() throws Exception {
this.initializer.setSearchNames("testprofiles");
this.environment.setActiveProfiles("other", "dev");
this.initializer.onApplicationEvent(this.event);
String property = this.environment.getProperty("my.property");
assertThat(property, equalTo("fromotherprofile"));
property = this.environment.getProperty("my.other");
assertThat(property, equalTo("notempty"));
}
@Test
public void yamlSetsProfiles() throws Exception {
this.initializer.setSearchNames("testsetprofiles");
......
......@@ -6,4 +6,9 @@ my:
spring:
profiles: dev
my:
property: fromdevprofile
\ No newline at end of file
property: fromdevprofile
---
spring:
profiles: other
my:
property: fromotherprofile
\ No newline at end of file
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