Skip to content

Commit

Permalink
remove JSON invalid encoding test
Browse files Browse the repository at this point in the history
> Go 1.7 adds support for maps using keys with integer types: the
> encoding uses a quoted decimal representation as the JSON key.

in: https://tip.golang.org/doc/go1.7, under encoding/json
  • Loading branch information
aybabtme committed Jun 9, 2016
1 parent 1124654 commit 8897364
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions godo_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package godo

import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
Expand Down Expand Up @@ -135,22 +134,6 @@ func TestNewRequest_withUserData(t *testing.T) {
}
}

func TestNewRequest_invalidJSON(t *testing.T) {
c := NewClient(nil)

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 TestNewRequest_badURL(t *testing.T) {
c := NewClient(nil)
_, err := c.NewRequest("GET", ":", nil)
Expand Down

0 comments on commit 8897364

Please sign in to comment.