Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mozillazg committed Jan 17, 2015
1 parent 50e05e2 commit 6324420
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions request_test.go
Expand Up @@ -305,17 +305,17 @@ func currentIPHTTPS(u string) (ip string) {
return d.Get("origin").MustString()
}

// func TestProxy(t *testing.T) {
// ip := currentIP("")
// httpProxyURL := os.Getenv("http_proxy_url")
// httpsProxyURL := os.Getenv("https_proxy_url")
// socks5ProxyURL := os.Getenv("socks5_proxy_url")
//
// assert.Equal(t, currentIP(httpProxyURL) != ip, true)
// assert.Equal(t, currentIP(httpsProxyURL) != ip, true)
// // assert.Equal(t, currentIPHTTPS(httpsProxyURL) != ip, true)
// assert.Equal(t, currentIP(socks5ProxyURL) != ip, true)
// }
func TestProxy(t *testing.T) {
ip := currentIP("")
httpProxyURL := os.Getenv("http_proxy_url")
httpsProxyURL := os.Getenv("https_proxy_url")
socks5ProxyURL := os.Getenv("socks5_proxy_url")

assert.Equal(t, currentIP(httpProxyURL) != ip, true)
assert.Equal(t, currentIP(httpsProxyURL) != ip, true)
// assert.Equal(t, currentIPHTTPS(httpsProxyURL) != ip, true)
assert.Equal(t, currentIP(socks5ProxyURL) != ip, true)
}

func TestBasicAuth(t *testing.T) {
c := &http.Client{}
Expand Down

0 comments on commit 6324420

Please sign in to comment.