Skip to content

Commit 5e29bcf

Browse files
committed
Make BasicAuth.NewContext tests backwards compatible with Go 1.8
1 parent 255dc6e commit 5e29bcf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

basic_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ func TestBasicAuthContext(t *testing.T) {
7979
fmt.Fprint(w, authInfo.Username)
8080
}))
8181
defer ts.Close()
82-
client := ts.Client()
8382
for _, tt := range []struct {
8483
username, password string
8584
want int
@@ -92,7 +91,7 @@ func TestBasicAuthContext(t *testing.T) {
9291
t.Fatal(err)
9392
}
9493
r.SetBasicAuth(tt.username, tt.password)
95-
resp, err := client.Do(r)
94+
resp, err := http.DefaultClient.Do(r)
9695
if err != nil {
9796
t.Fatalf("HTTP request failed: %v", err)
9897
}

0 commit comments

Comments
 (0)