mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-23 00:50:20 +08:00
test: add more tests (#1352)
This commit is contained in:
parent
71d40e0c08
commit
26101732d2
@ -1,7 +1,6 @@
|
||||
package pathvar
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strings"
|
||||
"testing"
|
||||
@ -16,7 +15,7 @@ func TestVars(t *testing.T) {
|
||||
}
|
||||
r, err := http.NewRequest(http.MethodGet, "/", nil)
|
||||
assert.Nil(t, err)
|
||||
r = r.WithContext(context.WithValue(context.Background(), pathVars, expect))
|
||||
r = WithVars(r, expect)
|
||||
assert.EqualValues(t, expect, Vars(r))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user