equal
deleted
inserted
replaced
1 package gondole |
1 package gondole |
2 |
2 |
3 import ( |
3 import ( |
4 "testing" |
4 "testing" |
5 "github.com/stretchr/testify/assert" |
5 |
|
6 "github.com/sendgrid/rest" |
|
7 "github.com/stretchr/testify/assert" |
6 ) |
8 ) |
7 |
9 |
8 func TestPrepareRequest(t *testing.T) { |
10 func TestPrepareRequest(t *testing.T) { |
9 g := &Client{ |
11 g := &Client{ |
10 Name: "foo", |
12 Name: "foo", |
11 ID: "666", |
13 ID: "666", |
12 Secret: "biiiip", |
14 Secret: "biiiip", |
13 APIBase: "http://example.com", |
15 APIBase: "http://example.com", |
14 } |
16 } |
15 |
17 |
16 req := g.prepareRequest("bar") |
18 req := g.prepareRequest("bar", rest.Get, nil) |
17 assert.NotNil(t, req.Headers, "not nil") |
19 assert.NotNil(t, req.Headers, "not nil") |
18 assert.NotNil(t, req.QueryParams, "not nil") |
|
19 } |
20 } |
20 |
|