Skip to content

Commit

Permalink
Make tests work with Go 1.7 as well
Browse files Browse the repository at this point in the history
  • Loading branch information
flimzy committed Oct 11, 2017
1 parent 39c093a commit 0746d8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions find_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestUnmarshalQueryPlan(t *testing.T) {
{
name: "non-array",
input: `{"fields":{}}`,
err: "json: cannot unmarshal object into Go struct field queryPlan.fields of type []interface {}",
err: "json: cannot unmarshal object into Go",
},
{
name: "all_fields",
Expand All @@ -107,14 +107,14 @@ func TestUnmarshalQueryPlan(t *testing.T) {
{
name: "invalid bare string",
input: `{"fields":"not_all_fields"}`,
err: "json: cannot unmarshal string into Go struct field queryPlan.fields of type []interface {}",
err: "json: cannot unmarshal string into Go",
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
result := new(queryPlan)
err := json.Unmarshal([]byte(test.input), &result)
testy.Error(t, test.err, err)
testy.ErrorRE(t, test.err, err)
if d := diff.Interface(test.expected, result); d != nil {
t.Error(d)
}
Expand Down
2 changes: 2 additions & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ testImport:
- package: github.com/go-kivik/kiviktest
subpackages:
- kt
- package: github.com/flimzy/testy
version: ^0.0.2

0 comments on commit 0746d8c

Please sign in to comment.