Created
October 22, 2017 18:53
-
-
Save AlexeySoshin/7ac6ccdd15bfc19b18edefad5cc0218b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(SpringRunner::class) | |
@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT) | |
class NoCatsTest { | |
@Autowired lateinit var restTemplate: TestRestTemplate | |
@Test | |
fun indexShouldReturnEmptyListWhenNoCatsExist() { | |
val response = restTemplate.getForEntity("/", CatsList::class.java) | |
assertThat(response.statusCode).isEqualTo(HttpStatus.OK) | |
assertThat(response.body).isNotNull.isEmpty() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment