Skip to content

Commit

Permalink
Test improvements and release
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevatkm committed Sep 24, 2015
1 parent d8e860e commit 965af26
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resty_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,11 @@ func TestProxySetting(t *testing.T) {
func TestIncorrectURL(t *testing.T) {
_, err := R().Get("//not.a.user@%66%6f%6f.com/just/a/path/also")
assertEqual(t, true, strings.Contains(err.Error(), "parse //not.a.user@%66%6f%6f.com/just/a/path/also"))

c := dc()
c.SetHostURL("//not.a.user@%66%6f%6f.com")
_, err1 := c.R().Get("/just/a/path/also")
assertEqual(t, true, strings.Contains(err1.Error(), "parse //not.a.user@%66%6f%6f.com/just/a/path/also"))
}

func TestClientOptions(t *testing.T) {
Expand Down Expand Up @@ -895,6 +900,7 @@ func TestClientOptions(t *testing.T) {
SetRedirectPolicy(FlexibleRedirectPolicy(10), func(req *http.Request, via []*http.Request) error {
return errors.New("sample test redirect")
})
SetContentLength(true)
SetDebug(true)
SetLogger(ioutil.Discard)
}
Expand Down

0 comments on commit 965af26

Please sign in to comment.