MCPcopy Index your code
hub / github.com/labstack/echo / TestBindQueryParams

Function TestBindQueryParams

bind_test.go:239–250  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

237}
238
239func TestBindQueryParams(t *testing.T) {
240 e := New()
241 req := httptest.NewRequest(http.MethodGet, "/?id=1&name=Jon+Snow", nil)
242 rec := httptest.NewRecorder()
243 c := e.NewContext(req, rec)
244 u := new(user)
245 err := c.Bind(u)
246 if assert.NoError(t, err) {
247 assert.Equal(t, 1, u.ID)
248 assert.Equal(t, "Jon Snow", u.Name)
249 }
250}
251
252func TestBindQueryParamsCaseInsensitive(t *testing.T) {
253 e := New()

Callers

nothing calls this directly

Calls 3

BindMethod · 0.95
NewFunction · 0.85
NewContextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…