Files
initializr/test/integration.groovy

30 lines
859 B
Groovy
Raw Normal View History

2014-05-28 17:26:53 +01:00
package test
@SpringApplicationConfiguration(classes=app.MainController)
@WebAppConfiguration
@IntegrationTest('server.port:0')
@DirtiesContext
class IntegrationTests {
@Value('${local.server.port}')
int port
@Test
2014-05-28 19:25:35 +01:00
void homeIsZipForm() {
2014-05-28 17:26:53 +01:00
String body = new TestRestTemplate().getForObject('http://localhost:' + port, String)
assertTrue('Wrong body:\n' + body, body.contains('action="/starter.zip"'))
}
2014-05-28 19:25:35 +01:00
@Test
void infoHasExternalProperties() {
String body = new TestRestTemplate().getForObject('http://localhost:' + port + '/info', String)
assertTrue('Wrong body:\n' + body, body.contains('"project"'))
}
@Test
void homeHasWebStyle() {
String body = new TestRestTemplate().getForObject('http://localhost:' + port, String)
assertTrue('Wrong body:\n' + body, body.contains('name="style" value="web"'))
}
2014-05-28 17:26:53 +01:00
}