From 2c14e05229e721ab5992d7d6c78df50418383b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Gallego=20Rodr=C3=ADguez?= Date: Wed, 9 Oct 2019 16:26:22 +0200 Subject: [PATCH] fix test comparsion --- internal/server/control/control_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/server/control/control_test.go b/internal/server/control/control_test.go index 541011b..880988d 100644 --- a/internal/server/control/control_test.go +++ b/internal/server/control/control_test.go @@ -174,7 +174,7 @@ func TestListRoutesReturnsTwoElementsList(t *testing.T) { } respJson := []model.Route{} - if err := json.Unmarshal(resp.Body.Bytes(), &respJson); err == nil { + if err := json.Unmarshal(resp.Body.Bytes(), &respJson); err != nil { t.Errorf("Invalid JSON response. %s", resp.Body.String()) } @@ -263,5 +263,4 @@ func TestAddRouteReturns422ErrorWhenNoCommand(t *testing.T) { if resp.Code != http.StatusUnprocessableEntity { t.Errorf("HTTP status mistmacht. Expected: %d, got: %d", http.StatusUnprocessableEntity, resp.Code) } - }