Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(90)

Unified Diff: transport_test.go

Issue 104700043: oauth2: avoid using http.DefaultTransport
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« google/appengine.go ('K') | « transport.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: transport_test.go
diff --git a/transport_test.go b/transport_test.go
index 847266a37a6988b056282583b0f554de85c91102..e5bfe6f8582dfd461b11b8dadeb605bc45007332 100644
--- a/transport_test.go
+++ b/transport_test.go
@@ -14,7 +14,7 @@ func (f *mockTokenFetcher) FetchToken(existing *Token) (*Token, error) {
}
func TestInitialTokenRead(t *testing.T) {
- tr := NewAuthorizedTransport(nil, &Token{AccessToken: "abc"})
+ tr := NewAuthorizedTransport(http.DefaultTransport, nil, &Token{AccessToken: "abc"})
server := newMockServer(func(w http.ResponseWriter, r *http.Request) {
if r.Header.Get("Authorization") != "Bearer abc" {
t.Errorf("Transport doesn't set the Authorization header from the initial token")
@@ -31,7 +31,7 @@ func TestTokenFetch(t *testing.T) {
AccessToken: "abc",
},
}
- tr := NewAuthorizedTransport(fetcher, nil)
+ tr := NewAuthorizedTransport(http.DefaultTransport, fetcher, nil)
server := newMockServer(func(w http.ResponseWriter, r *http.Request) {
if r.Header.Get("Authorization") != "Bearer abc" {
t.Errorf("Transport doesn't set the Authorization header from the fetched token")
« google/appengine.go ('K') | « transport.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b