(t *testing.T)
| 183 | } |
| 184 | |
| 185 | func TestValueBinder_BindError(t *testing.T) { |
| 186 | c := createTestContext("/api/user/999?nr=en&id=nope", nil, nil) |
| 187 | b := QueryParamsBinder(c) |
| 188 | |
| 189 | id := int64(99) |
| 190 | nr := int64(88) |
| 191 | err := b.Int64("id", &id). |
| 192 | Int64("nr", &nr). |
| 193 | BindError() |
| 194 | |
| 195 | assert.EqualError(t, err, "code=400, message=failed to bind field value to int64, err=strconv.ParseInt: parsing \"nope\": invalid syntax, field=id") |
| 196 | assert.Nil(t, b.errors) |
| 197 | assert.Nil(t, b.BindError()) |
| 198 | } |
| 199 | |
| 200 | func TestValueBinder_GetValues(t *testing.T) { |
| 201 | var testCases = []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…