mirror of
https://gitee.com/johng/gf.git
synced 2024-11-30 11:18:02 +08:00
fix issue in unit testing case for package ghttp
This commit is contained in:
parent
a47699bf6e
commit
b129ee3f04
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user