--- a/gondole_test.go Sat Apr 15 00:39:43 2017 +0200
+++ b/gondole_test.go Sat Apr 15 10:26:36 2017 +0200
@@ -1,20 +1,20 @@
package gondole
import (
- "testing"
- "github.com/stretchr/testify/assert"
+ "testing"
+
+ "github.com/sendgrid/rest"
+ "github.com/stretchr/testify/assert"
)
func TestPrepareRequest(t *testing.T) {
- g := &Client{
- Name: "foo",
- ID: "666",
- Secret: "biiiip",
- APIBase: "http://example.com",
- }
+ g := &Client{
+ Name: "foo",
+ ID: "666",
+ Secret: "biiiip",
+ APIBase: "http://example.com",
+ }
- req := g.prepareRequest("bar")
- assert.NotNil(t, req.Headers, "not nil")
- assert.NotNil(t, req.QueryParams, "not nil")
+ req := g.prepareRequest("bar", rest.Get, nil)
+ assert.NotNil(t, req.Headers, "not nil")
}
-