Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package client |
||
2 | |||
3 | import ( |
||
4 | "net/http" |
||
5 | "testing" |
||
6 | |||
7 | "github.com/stretchr/testify/assert" |
||
8 | ) |
||
9 | |||
10 | func TestDecorateTransportHeaderShouldFailWithNilDecorated(t *testing.T) { |
||
11 | transport, err := decorateTransportWithHeadersDecorator(nil, map[string]string{}) |
||
12 | assert.Nil(t, transport) |
||
13 | assert.Error(t, err) |
||
14 | } |
||
15 | |||
16 | func TestDecorateTransportHeaderShouldFailWithNilHeaderMap(t *testing.T) { |
||
17 | transport, err := decorateTransportWithHeadersDecorator(http.DefaultTransport, nil) |
||
18 | assert.Nil(t, transport) |
||
19 | assert.Error(t, err) |
||
20 | } |
||
21 |