Skip to content

Commit

Permalink
Removed unnecessary TestNewRequest_InvalidJSON unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrunwald committed Sep 17, 2016
1 parent 2f33911 commit 8534915
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions gerrit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package gerrit_test

import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 8534915

Please sign in to comment.