Skip to content

Commit 965af26

Browse files
committed
Test improvements and release
1 parent d8e860e commit 965af26

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

resty_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,11 @@ func TestProxySetting(t *testing.T) {
813813
func TestIncorrectURL(t *testing.T) {
814814
_, err := R().Get("//not.a.user@%66%6f%6f.com/just/a/path/also")
815815
assertEqual(t, true, strings.Contains(err.Error(), "parse //not.a.user@%66%6f%6f.com/just/a/path/also"))
816+
817+
c := dc()
818+
c.SetHostURL("//not.a.user@%66%6f%6f.com")
819+
_, err1 := c.R().Get("/just/a/path/also")
820+
assertEqual(t, true, strings.Contains(err1.Error(), "parse //not.a.user@%66%6f%6f.com/just/a/path/also"))
816821
}
817822

818823
func TestClientOptions(t *testing.T) {
@@ -895,6 +900,7 @@ func TestClientOptions(t *testing.T) {
895900
SetRedirectPolicy(FlexibleRedirectPolicy(10), func(req *http.Request, via []*http.Request) error {
896901
return errors.New("sample test redirect")
897902
})
903+
SetContentLength(true)
898904
SetDebug(true)
899905
SetLogger(ioutil.Discard)
900906
}

0 commit comments

Comments
 (0)