server tests fixed

This commit is contained in:
alessio 2017-08-14 22:23:59 +02:00
parent a841339b72
commit 9b7c410b41
1 changed files with 5 additions and 2 deletions

View File

@ -19,6 +19,9 @@ func TestServer_Start(t *testing.T) {
Settings: &s,
}
err := server.Start(nil)
if err != nil{
t.Fatal(err)
}
host := "http://localhost:5000/"
urls := []string{
host,
@ -40,8 +43,8 @@ func TestServer_Start(t *testing.T) {
host+"assets/img/svg/ic_swap_vertical_circle_black_48px.svg",
}
for _, elm := range urls {
_, err = http.Get(elm)
if err != nil {
resp, err := http.Get(elm)
if err != nil || resp.StatusCode != 200 {
t.Fatal(err)
}
}