Package: golang-github-digitalocean-godo / 0.9.0-2

remove-json-invalid-encoding-test.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Description: remove JSON invalid encoding test
 Go 1.7 adds support for maps using keys with integer types: the
 encoding uses a quoted decimal representation as the JSON key.
Origin: https://github.com/digitalocean/godo/commit/8897364
Bug-Debian: https://bugs.debian.org/835748
Last-Update: 2016-11-13

--- a/godo_test.go
+++ b/godo_test.go
@@ -1,7 +1,6 @@
 package godo
 
 import (
-	"encoding/json"
 	"fmt"
 	"io/ioutil"
 	"net/http"
@@ -135,22 +134,6 @@
 	}
 }
 
-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)