gondole_test.go
changeset 120 579912e9d0ef
parent 79 d030a6eb770b
child 128 a5a00fad7a32
equal deleted inserted replaced
119:22c8c58ad61b 120:579912e9d0ef
     1 package gondole
     1 package gondole
     2 
     2 
     3 import (
     3 import (
     4     "testing"
     4 	"testing"
     5     "github.com/stretchr/testify/assert"
     5 
       
     6 	"github.com/sendgrid/rest"
       
     7 	"github.com/stretchr/testify/assert"
     6 )
     8 )
     7 
     9 
     8 func TestPrepareRequest(t *testing.T) {
    10 func TestPrepareRequest(t *testing.T) {
     9     g := &Client{
    11 	g := &Client{
    10         Name: "foo",
    12 		Name:    "foo",
    11         ID: "666",
    13 		ID:      "666",
    12         Secret: "biiiip",
    14 		Secret:  "biiiip",
    13         APIBase: "http://example.com",
    15 		APIBase: "http://example.com",
    14     }
    16 	}
    15 
    17 
    16     req := g.prepareRequest("bar")
    18 	req := g.prepareRequest("bar", rest.Get, nil)
    17     assert.NotNil(t, req.Headers, "not nil")
    19 	assert.NotNil(t, req.Headers, "not nil")
    18     assert.NotNil(t, req.QueryParams, "not nil")
       
    19 }
    20 }
    20