Commit 7c161b99 authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #7907 from eddumelendez:fix_assertions

* pr/7907:
  Fix incomplete assertions
parents b9eda3f2 f896ff9a
...@@ -85,8 +85,8 @@ public class MongoHealthIndicatorTests { ...@@ -85,8 +85,8 @@ public class MongoHealthIndicatorTests {
MongoHealthIndicator healthIndicator = new MongoHealthIndicator(mongoTemplate); MongoHealthIndicator healthIndicator = new MongoHealthIndicator(mongoTemplate);
Health health = healthIndicator.health(); Health health = healthIndicator.health();
assertThat(health.getStatus()).isEqualTo(Status.DOWN); assertThat(health.getStatus()).isEqualTo(Status.DOWN);
assertThat(((String) health.getDetails().get("error")) assertThat((String) health.getDetails().get("error"))
.contains("Connection failed")); .contains("Connection failed");
verify(mongoTemplate).executeCommand("{ buildInfo: 1 }"); verify(mongoTemplate).executeCommand("{ buildInfo: 1 }");
} }
......
...@@ -816,7 +816,7 @@ public class SpringApplicationTests { ...@@ -816,7 +816,7 @@ public class SpringApplicationTests {
this.context = application.run(); this.context = application.run();
assertThat(this.context.getEnvironment()) assertThat(this.context.getEnvironment())
.isNotInstanceOf(StandardServletEnvironment.class); .isNotInstanceOf(StandardServletEnvironment.class);
assertThat(this.context.getEnvironment().getProperty("foo")); assertThat(this.context.getEnvironment().getProperty("foo")).isEqualTo("bar");
assertThat(this.context.getEnvironment().getPropertySources().iterator().next() assertThat(this.context.getEnvironment().getPropertySources().iterator().next()
.getName()).isEqualTo( .getName()).isEqualTo(
TestPropertySourceUtils.INLINED_PROPERTIES_PROPERTY_SOURCE_NAME); TestPropertySourceUtils.INLINED_PROPERTIES_PROPERTY_SOURCE_NAME);
......
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