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

Function TestBindQueryParamsCaseSensitivePrioritized

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

Source from the content-addressed store, hash-verified

263}
264
265func TestBindQueryParamsCaseSensitivePrioritized(t *testing.T) {
266 e := New()
267 req := httptest.NewRequest(http.MethodGet, "/?id=1&ID=2&NAME=Jon+Snow&name=Jon+Doe", nil)
268 rec := httptest.NewRecorder()
269 c := e.NewContext(req, rec)
270 u := new(user)
271 err := c.Bind(u)
272 if assert.NoError(t, err) {
273 assert.Equal(t, 1, u.ID)
274 assert.Equal(t, "Jon Doe", u.Name)
275 }
276}
277
278func TestBindHeaderParam(t *testing.T) {
279 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…