response: Move to methods

This commit is contained in:
Adnan Maolood
2021-02-24 08:43:57 -05:00
parent 094c16297b
commit 3101856afa
2 changed files with 24 additions and 19 deletions

View File

@@ -91,11 +91,11 @@ func TestReadWriteResponse(t *testing.T) {
// No response
continue
}
if resp.Status != test.Status {
t.Errorf("expected status = %d, got %d", test.Status, resp.Status)
if resp.status != test.Status {
t.Errorf("expected status = %d, got %d", test.Status, resp.status)
}
if resp.Meta != test.Meta {
t.Errorf("expected meta = %s, got %s", test.Meta, resp.Meta)
if resp.meta != test.Meta {
t.Errorf("expected meta = %s, got %s", test.Meta, resp.meta)
}
b, _ := ioutil.ReadAll(resp.body)
body := string(b)