MCPcopy
hub / github.com/labstack/echo / TestBindQueryParamsCaseInsensitive

Function TestBindQueryParamsCaseInsensitive

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

Source from the content-addressed store, hash-verified

250}
251
252func TestBindQueryParamsCaseInsensitive(t *testing.T) {
253 e := New()
254 req := httptest.NewRequest(http.MethodGet, "/?ID=1&NAME=Jon+Snow", nil)
255 rec := httptest.NewRecorder()
256 c := e.NewContext(req, rec)
257 u := new(user)
258 err := c.Bind(u)
259 if assert.NoError(t, err) {
260 assert.Equal(t, 1, u.ID)
261 assert.Equal(t, "Jon Snow", u.Name)
262 }
263}
264
265func TestBindQueryParamsCaseSensitivePrioritized(t *testing.T) {
266 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…