Skip to content

Commit

Permalink
update unit-test for AllParams()
Browse files Browse the repository at this point in the history
update unit-test for AllParams()
  • Loading branch information
xmh19936688 committed Feb 25, 2020
1 parent b491701 commit 8924e9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions context_test.go
Expand Up @@ -173,14 +173,14 @@ func Test_Context(t *testing.T) {

Convey("All Parameter", func() {
m.Get("/:arg/:param/:flag", func(ctx *Context) int {
return len(ctx.AllParams())
return com.ToStr(len(ctx.AllParams()))
})

resp := httptest.NewRecorder()
req, err := http.NewRequest("GET", "/arg/param/flag", nil)
So(err, ShouldBeNil)
m.ServeHTTP(resp,req)
So(resp.Body.Int(), ShouldEqual, 3)
So(resp.Body.String(), ShouldEqual, "3")
})

Convey("Get file", func() {
Expand Down

0 comments on commit 8924e9e

Please sign in to comment.