extend test case

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-02-06 19:05:55 +03:00
parent 4237630f98
commit ce49e7d867

View File

@ -1,6 +1,8 @@
package http
import (
"net/url"
"strings"
"testing"
)
@ -17,7 +19,15 @@ func TestValidPath(t *testing.T) {
if err != nil {
t.Fatal(err)
}
_, _ = p, m
u, err := url.Parse(p)
if err != nil {
t.Fatal(err)
}
_ = m
parts := strings.Split(u.RawQuery, "&")
if len(parts) != 3 {
t.Fatalf("invalid path: %v", parts)
}
}
func TestInvalidPath(t *testing.T) {