(t *testing.T)
| 141 | } |
| 142 | |
| 143 | func TestDecodeMapStructUrlVales(t *testing.T) { |
| 144 | query := &url.Values{} |
| 145 | query.Set("page", "1") |
| 146 | query.Set("pageSize", "100") |
| 147 | |
| 148 | var pagination struct { |
| 149 | Page int `mapstructure:"page"` |
| 150 | PageSize int `mapstructure:"pageSize"` |
| 151 | } |
| 152 | |
| 153 | err := DecodeMapStruct(query, &pagination, true) |
| 154 | assert.Nil(t, err) |
| 155 | assert.Equal(t, 1, pagination.Page) |
| 156 | assert.Equal(t, 100, pagination.PageSize) |
| 157 | } |
nothing calls this directly
no test coverage detected