gondole_test.go
author Mikael Berthe <mikael@lilotux.net>
Wed, 19 Apr 2017 09:30:47 +0200
changeset 137 acaea3179f4d
parent 128 a5a00fad7a32
permissions -rw-r--r--
Use my own library name Move library to a new home (aka fork) instead of using my own branch of gondole, which isn't very convenient and can be confusing.

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")
}