Skip to content

Commit

Permalink
add testcase in empty option
Browse files Browse the repository at this point in the history
  • Loading branch information
emahiro committed Oct 30, 2019
1 parent 4f6e0f6 commit dcb2b84
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ func TestRoundTrip(t *testing.T) {
}
}),
},
{
name: "success to get authorization header in empty options",
arg: Transport(http.DefaultTransport, []Option{}...),
handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if h := r.Header.Get("Authorization"); h == "" {
t.Fatalf("Authorization Header is required")
}
}),
},
{
name: "faield to get authorization header",
arg: &http.Transport{},
Expand Down

0 comments on commit dcb2b84

Please sign in to comment.