Refactor integration tests to be a little cleaner and more stable, I hope

This commit is contained in:
Jakob Borg
2015-05-23 22:56:43 +02:00
parent e215cf6fb8
commit 9463192224
10 changed files with 145 additions and 317 deletions

View File

@@ -176,11 +176,13 @@ func TestGetJSON(t *testing.T) {
for _, path := range jsonEndpoints {
res, err := st.get(path)
if err != nil {
t.Error(err)
t.Error(path, err)
continue
}
if ct := res.Header.Get("Content-Type"); ct != "application/json; charset=utf-8" {
t.Errorf("Incorrect Content-Type %q for %q", ct, path)
continue
}
var intf interface{}
@@ -188,7 +190,7 @@ func TestGetJSON(t *testing.T) {
res.Body.Close()
if err != nil {
t.Error(err)
t.Error(path, err)
}
}
}