Skip to content

Commit 8534915

Browse files
committed
Removed unnecessary TestNewRequest_InvalidJSON unit test
1 parent 2f33911 commit 8534915

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

gerrit_test.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package gerrit_test
22

33
import (
44
"bytes"
5-
"encoding/json"
65
"fmt"
76
"io/ioutil"
87
"net/http"
@@ -139,25 +138,6 @@ func TestNewRequest(t *testing.T) {
139138
}
140139
}
141140

142-
func TestNewRequest_InvalidJSON(t *testing.T) {
143-
c, err := gerrit.NewClient(testGerritInstanceURL, nil)
144-
if err != nil {
145-
t.Errorf("An error occured. Expected nil. Got %+v.", err)
146-
}
147-
148-
type T struct {
149-
A map[int]interface{}
150-
}
151-
_, err = c.NewRequest("GET", "/", &T{})
152-
153-
if err == nil {
154-
t.Error("Expected error to be returned.")
155-
}
156-
if err, ok := err.(*json.UnsupportedTypeError); !ok {
157-
t.Errorf("Expected a JSON error; got %#v.", err)
158-
}
159-
}
160-
161141
func testURLParseError(t *testing.T, err error) {
162142
if err == nil {
163143
t.Errorf("Expected error to be returned")

0 commit comments

Comments
 (0)