This commit is contained in:
Luke Kysow
2018-06-21 18:18:54 +01:00
parent d359131a29
commit d3ec832eff
57 changed files with 1776 additions and 1124 deletions

View File

@@ -103,6 +103,7 @@ func TestIndex_Success(t *testing.T) {
}
func responseContains(t *testing.T, r *httptest.ResponseRecorder, status int, bodySubstr string) {
t.Helper()
Equals(t, status, r.Result().StatusCode)
body, _ := ioutil.ReadAll(r.Result().Body)
Assert(t, strings.Contains(string(body), bodySubstr), "exp %q to be contained in %q", bodySubstr, string(body))