Skip to content

Commit

Permalink
test: add more tests (zeromicro#1352)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevwan authored Dec 20, 2021
1 parent 71d40e0 commit 2610173
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rest/pathvar/params_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package pathvar

import (
"context"
"net/http"
"strings"
"testing"
Expand All @@ -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))
}

Expand Down

0 comments on commit 2610173

Please sign in to comment.