Skip to content

Commit

Permalink
Merge branch '2.1.x' into 2.2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Dec 12, 2019
2 parents 9136f54 + bf39741 commit 01753ab
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@
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 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
*/
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@AutoConfigureTestDatabase
Expand All @@ -55,7 +58,8 @@ void setup() {

@Test
void test() {
this.restTemplate.getForEntity("/{username}/vehicle", String.class, "sframework");
assertThat(this.restTemplate.getForEntity("/{username}/vehicle", String.class, "sframework").getStatusCode())
.isEqualTo(HttpStatus.OK);
}

}

0 comments on commit 01753ab

Please sign in to comment.