mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
fix issue in unit testing case for package ghttp
This commit is contained in:
@ -10,6 +10,7 @@ package ghttp_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/gogf/gf/errors/gcode"
|
||||
"github.com/gogf/gf/errors/gerror"
|
||||
"github.com/gogf/gf/net/ghttp"
|
||||
"testing"
|
||||
@ -30,7 +31,7 @@ func Test_Error_Code(t *testing.T) {
|
||||
r.Response.Write(gerror.Code(r.GetError()))
|
||||
})
|
||||
group.ALL("/", func(r *ghttp.Request) {
|
||||
panic(gerror.NewCode(10000, "test error"))
|
||||
panic(gerror.NewCode(gcode.New(10000, "", nil), "test error"))
|
||||
})
|
||||
})
|
||||
s.SetPort(p)
|
||||
|
||||
Reference in New Issue
Block a user