1 package urlx 2 3 import ( 4 "net/url" 5 "testing" 6 7 "github.com/stretchr/testify/assert" 8 ) 9 10 func TestCopy(t *testing.T) { 11 a, _ := url.Parse("http://localhost/1234") 12 b := Copy(a) 13 14 b.Path = "foo" 15 assert.NotEqual(t, a.Path, b.Path) 16 } 17