JoinURL now returns *url.URL and error
This commit is contained in:
@ -9,5 +9,7 @@ func TestResponse_JoinURL(t *testing.T) {
|
||||
req, _ := NewRequest("GET", "https://localhost.com/test/a.html", nil)
|
||||
resp := Response{Request: req}
|
||||
|
||||
assert.Equal(t, "https://localhost.com/source", resp.JoinURL("/source"))
|
||||
joinedURL, err := resp.JoinURL("/source")
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "https://localhost.com/source", joinedURL.String())
|
||||
}
|
||||
|
Reference in New Issue
Block a user