mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix incomplete assertions
Closes gh-7907
This commit is contained in:
parent
b9eda3f26b
commit
f896ff9a10
@ -85,8 +85,8 @@ public class MongoHealthIndicatorTests {
|
||||
MongoHealthIndicator healthIndicator = new MongoHealthIndicator(mongoTemplate);
|
||||
Health health = healthIndicator.health();
|
||||
assertThat(health.getStatus()).isEqualTo(Status.DOWN);
|
||||
assertThat(((String) health.getDetails().get("error"))
|
||||
.contains("Connection failed"));
|
||||
assertThat((String) health.getDetails().get("error"))
|
||||
.contains("Connection failed");
|
||||
verify(mongoTemplate).executeCommand("{ buildInfo: 1 }");
|
||||
}
|
||||
|
||||
|
@ -816,7 +816,7 @@ public class SpringApplicationTests {
|
||||
this.context = application.run();
|
||||
assertThat(this.context.getEnvironment())
|
||||
.isNotInstanceOf(StandardServletEnvironment.class);
|
||||
assertThat(this.context.getEnvironment().getProperty("foo"));
|
||||
assertThat(this.context.getEnvironment().getProperty("foo")).isEqualTo("bar");
|
||||
assertThat(this.context.getEnvironment().getPropertySources().iterator().next()
|
||||
.getName()).isEqualTo(
|
||||
TestPropertySourceUtils.INLINED_PROPERTIES_PROPERTY_SOURCE_NAME);
|
||||
|
Loading…
Reference in New Issue
Block a user