pkg/scan/client/headers_internal_test.go   A
last analyzed

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 13
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A client.TestDecorateTransportHeaderShouldFailWithNilDecorated 0 4 1
A client.TestDecorateTransportHeaderShouldFailWithNilHeaderMap 0 4 1
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