changeset 138 | 23d3a518d0ad |
parent 137 | acaea3179f4d |
child 139 | 7145e95b4f57 |
137:acaea3179f4d | 138:23d3a518d0ad |
---|---|
1 package gondole |
|
2 |
|
3 import ( |
|
4 "testing" |
|
5 |
|
6 "github.com/sendgrid/rest" |
|
7 "github.com/stretchr/testify/assert" |
|
8 ) |
|
9 |
|
10 func TestPrepareRequest(t *testing.T) { |
|
11 g := &Client{ |
|
12 Name: "foo", |
|
13 ID: "666", |
|
14 Secret: "biiiip", |
|
15 APIBase: "http://example.com", |
|
16 } |
|
17 |
|
18 req, err := g.prepareRequest("bar", rest.Get, nil) |
|
19 assert.NoError(t, err, "no error") |
|
20 assert.NotNil(t, req.Headers, "not nil") |
|
21 } |