diff --git a/gerrit_test.go b/gerrit_test.go index 034f87f..7d70350 100644 --- a/gerrit_test.go +++ b/gerrit_test.go @@ -2,7 +2,6 @@ package gerrit_test import ( "bytes" - "encoding/json" "fmt" "io/ioutil" "net/http" @@ -139,25 +138,6 @@ func TestNewRequest(t *testing.T) { } } -func TestNewRequest_InvalidJSON(t *testing.T) { - c, err := gerrit.NewClient(testGerritInstanceURL, nil) - if err != nil { - t.Errorf("An error occured. Expected nil. Got %+v.", err) - } - - type T struct { - A map[int]interface{} - } - _, err = c.NewRequest("GET", "/", &T{}) - - if err == nil { - t.Error("Expected error to be returned.") - } - if err, ok := err.(*json.UnsupportedTypeError); !ok { - t.Errorf("Expected a JSON error; got %#v.", err) - } -} - func testURLParseError(t *testing.T, err error) { if err == nil { t.Errorf("Expected error to be returned")