Add field "All" to LimitParams, change Limit behaviour
If All is true, the library will send several requests (if needed) until
the API server has sent all the results.
If not, and if a Limit is set, the library will try to fetch at least
this number of results.
package madon
import (
"testing"
"github.com/sendgrid/rest"
"github.com/stretchr/testify/assert"
)
func TestPrepareRequest(t *testing.T) {
mc := &Client{
Name: "foo",
ID: "666",
Secret: "biiiip",
APIBase: "http://example.com",
}
req, err := mc.prepareRequest("bar", rest.Get, nil)
assert.NoError(t, err, "no error")
assert.NotNil(t, req.Headers, "not nil")
}