Add missing assertion to SampleTestApplicationWebIntegrationTests.test()
See gh-19326
This commit is contained in:
parent
e5303ab755
commit
f22d0c7d8e
|
@ -29,14 +29,17 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
/**
|
||||
* {@code @SpringBootTest} with a random port for {@link SampleTestApplication}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Jorge Cordoba
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
|
||||
|
@ -58,7 +61,8 @@ public class SampleTestApplicationWebIntegrationTests {
|
|||
|
||||
@Test
|
||||
public void test() {
|
||||
this.restTemplate.getForEntity("/{username}/vehicle", String.class, "sframework");
|
||||
assertThat(this.restTemplate.getForEntity("/{username}/vehicle", String.class, "sframework")
|
||||
.getStatusCode()).isEqualTo(HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue