1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-08-06 22:13:02 +02:00

Killed unit test TestClient_NewRequest_InvalidJSON

This commit is contained in:
Andy Grunwald
2016-10-03 13:35:00 +02:00
parent f45edb11e4
commit a7647f3c7b

View File

@ -2,7 +2,6 @@ package jira
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
@ -146,25 +145,6 @@ func TestClient_NewRequest(t *testing.T) {
}
}
func TestClient_NewRequest_InvalidJSON(t *testing.T) {
c, err := NewClient(nil, testJIRAInstanceURL)
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")