@@ -180,8 +180,7 @@ func TestWrapClaimsAndReq(t *testing.T) {
180180
181181 t .Run ("Success get" , func (t * testing.T ) {
182182 w := httptest .NewRecorder ()
183- req , _ := http .NewRequest (http .MethodGet , "/full" , bytes .NewBufferString (`{"name":"bob"}` ))
184- req .Header .Set ("Content-Type" , "application/json" )
183+ req , _ := http .NewRequest (http .MethodGet , "/full?name=bob" , nil )
185184 g .ServeHTTP (w , req )
186185
187186 assert .Equal (t , http .StatusOK , w .Code )
@@ -201,6 +200,7 @@ func TestWrapClaimsAndReq(t *testing.T) {
201200 w := httptest .NewRecorder ()
202201 req , _ := http .NewRequest (http .MethodPost , "/full" , bytes .NewBufferString (`{"name":"bob"}` ))
203202 req .Header .Set ("Content-Type" , "application/json" )
203+
204204 g .ServeHTTP (w , req )
205205
206206 assert .Equal (t , http .StatusOK , w .Code )
@@ -213,7 +213,7 @@ func TestWrapClaimsAndReq(t *testing.T) {
213213
214214 assert .Equal (t , "ok" , resp .Message )
215215 assert .Equal (t , "bob" , m ["name" ])
216- assert .Equal (t , float64 (1 ), m ["uid" ]) // json.Unmarshal => float64
216+ assert .Equal (t , float64 (1 ), m ["uid" ])
217217 })
218218
219219 t .Run ("BindErr" , func (t * testing.T ) {
0 commit comments