Esempio n. 1
0
func TestURL(t *testing.T) {
	u, _ := url.Parse("https://github.com/insionng/vodka?param1=value1&param1=value2&param2=value3")
	mUrl := &URL{u, nil}
	test.URLTest(t, mUrl)

	mUrl.reset(&url.URL{})
	assert.Equal(t, "", mUrl.Host)
}
Esempio n. 2
0
func TestURL(t *testing.T) {
	uri := &fast.URI{}
	uri.Parse([]byte("github.com"), []byte("/insionng/vodka?param1=value1&param1=value2&param2=value3"))
	mUrl := &URL{uri}
	test.URLTest(t, mUrl)

	mUrl.reset(&fast.URI{})
	assert.Equal(t, "", string(mUrl.Host()))
}