should fix issue #23
This commit is contained in:
@@ -9,6 +9,7 @@ dependencies {
|
||||
testCompile project(":common-auth")
|
||||
testCompile "junit:junit:4.11"
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
|
||||
testCompile "org.jsoup:jsoup:1.9.2"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
@@ -4,10 +4,20 @@ package net.chrisrichardson.eventstore.examples.bank.web;
|
||||
import net.chrisrichardson.eventstorestore.javaexamples.testutil.AbstractRestAPITest;
|
||||
import net.chrisrichardson.eventstorestore.javaexamples.testutil.AuthenticatedRestTemplate;
|
||||
import net.chrisrichardson.eventstorestore.javaexamples.testutil.CustomersTestUtils;
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.junit.Test;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
public class EndToEndTest extends AbstractRestAPITest {
|
||||
|
||||
private String indexUrl = "http://" + getenv("SERVICE_HOST", "localhost") + ":" + 8080 + "/index.html";
|
||||
|
||||
private String getenv(String name, String defaultValue) {
|
||||
String x = System.getenv(name);
|
||||
return x == null ? defaultValue : x;
|
||||
@@ -21,6 +31,13 @@ public class EndToEndTest extends AbstractRestAPITest {
|
||||
return "http://" + getenv("SERVICE_HOST", "localhost") + ":" + 8080 + "/api" + path;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldLoadStaticPage() throws IOException {
|
||||
Document doc = Jsoup.connect(indexUrl).get();
|
||||
assertNotNull(doc.title());
|
||||
assertEquals("Money Transfer App", doc.title());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomersTestUtils getCustomersTestUtils() {
|
||||
return customersTestUtils;
|
||||
|
||||
Reference in New Issue
Block a user