aboutsummaryrefslogtreecommitdiff
path: root/cmd/cashierd/handlers_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/cashierd/handlers_test.go')
-rw-r--r--cmd/cashierd/handlers_test.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/cmd/cashierd/handlers_test.go b/cmd/cashierd/handlers_test.go
index 38251ce..a6bd113 100644
--- a/cmd/cashierd/handlers_test.go
+++ b/cmd/cashierd/handlers_test.go
@@ -114,12 +114,8 @@ func TestSignRevoke(t *testing.T) {
if resp.Code != http.StatusOK {
t.Error("Unexpected response")
}
- b, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- t.Error(err)
- }
r := &lib.SignResponse{}
- if err := json.Unmarshal(b, r); err != nil {
+ if err := json.NewDecoder(resp.Body).Decode(r); err != nil {
t.Error(err)
}
if r.Status != "ok" {