Skip to content

Commit

Permalink
Include 2 letter query param key in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
suzaku committed Dec 8, 2021
1 parent 4f82413 commit 169d0fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ func TestSuint(t *testing.T) {
}

func TestFilterCustomQuery(t *testing.T) {
n, err := nurl.Parse("foo://host?a=b&x-custom=foo&c=d")
n, err := nurl.Parse("foo://host?a=b&x-custom=foo&c=d&ok=y")
if err != nil {
t.Fatal(err)
}
nx := FilterCustomQuery(n).Query()
if nx.Get("x-custom") != "" {
t.Fatalf("didn't expect x-custom")
}
if nx.Get("ok") != "y" {
t.Fatalf("expected ok=y, got %v", nx.Get("ok"))
}
}

0 comments on commit 169d0fc

Please sign in to comment.