fix test comparsion

This commit is contained in:
César Gallego Rodríguez
2019-10-09 16:26:22 +02:00
parent b7a7f6a006
commit 2c14e05229
+1 -2
View File
@@ -174,7 +174,7 @@ func TestListRoutesReturnsTwoElementsList(t *testing.T) {
} }
respJson := []model.Route{} 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()) t.Errorf("Invalid JSON response. %s", resp.Body.String())
} }
@@ -263,5 +263,4 @@ func TestAddRouteReturns422ErrorWhenNoCommand(t *testing.T) {
if resp.Code != http.StatusUnprocessableEntity { if resp.Code != http.StatusUnprocessableEntity {
t.Errorf("HTTP status mistmacht. Expected: %d, got: %d", http.StatusUnprocessableEntity, resp.Code) t.Errorf("HTTP status mistmacht. Expected: %d, got: %d", http.StatusUnprocessableEntity, resp.Code)
} }
} }