MCPcopy
hub / github.com/danielgtaylor/huma / TestQuery

Function TestQuery

queryparam/queryparam_test.go:118–134  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

116}
117
118func TestQuery(t *testing.T) {
119 for _, item := range []struct {
120 query string
121 name string
122 expected string
123 }{
124 {"foo=bar", "foo", "bar"},
125 {"foo=bar&baz=123", "foo", "bar"},
126 {"foo=bar&baz=123", "baz", "123"},
127 {"foo=bar&baz=123", "missing", ""},
128 {"foo=bar&baz=123&bool&another", "bool", "true"},
129 } {
130 t.Run(item.query+"/"+item.name, func(t *testing.T) {
131 assert.Equal(t, item.expected, Get(item.query, item.name))
132 })
133 }
134}
135
136var Result string
137

Callers

nothing calls this directly

Calls 2

GetFunction · 0.70
RunMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…