func TestResponse(t *testing.T) { client := tango.NewTestClient(t) resp := client.Get("/") if resp.StatusCode != 200 { t.Errorf("resp.StatusCode(%v) != 200", resp.StatusCode) t.FailNow() } if resp.Content != "Hello, appengine." { t.Errorf("resp.Content('%v') != 'Hello, appengine.'", resp.Content) t.FailNow() } }
func TestResponse(t *testing.T) { client := tango.NewTestClient(t) // You can change settings like so; tango.Settings.Set("db_name", "postgres") tango.Settings.Set("db_user", "postgres") tango.Settings.Set("db_password", "") resp := client.Get("/") if resp.StatusCode != 200 { t.Errorf("resp.StatusCode(%v) != 200", resp.StatusCode) t.FailNow() } if !strings.Contains(resp.Content, "Postgres clock_timestamp is") { t.Errorf("resp.Content('%v') does not contain 'Postgres clock_timestamp is'", resp.Content) t.FailNow() } }