Change StreamListener prototype
Change StreamListener prototype in order to be able to use several
StreamListener's with the same event channel.
Stop a listener when the Readline call fails, since we probably cannot
know if we can resume safely.
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 := g.prepareRequest("bar", rest.Get, nil)
assert.NotNil(t, req.Headers, "not nil")
}