gondole_test.go
author Mikael Berthe <mikael@lilotux.net>
Tue, 18 Apr 2017 19:31:42 +0200
changeset 136 1af0a6199a93
parent 128 a5a00fad7a32
permissions -rw-r--r--
Change CreatedAt fields to time.Time

package gondole

import (
	"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",
	}

	req, err := g.prepareRequest("bar", rest.Get, nil)
	assert.NoError(t, err, "no error")
	assert.NotNil(t, req.Headers, "not nil")
}