forked from goffee/core
migration
This commit is contained in:
parent
7f38826b9c
commit
ac8ba89865
4 changed files with 35 additions and 35 deletions
|
|
@ -27,7 +27,7 @@ func TestResolveRouter(t *testing.T) {
|
|||
|
||||
func TestGetRequest(t *testing.T) {
|
||||
r := NewRouter()
|
||||
handler := Handler(func(c *Context) *Response {
|
||||
handler := Controller(func(c *Context) *Response {
|
||||
c.GetLogger().Info(TEST_STR)
|
||||
return nil
|
||||
})
|
||||
|
|
@ -41,7 +41,7 @@ func TestGetRequest(t *testing.T) {
|
|||
|
||||
func TestPostRequest(t *testing.T) {
|
||||
r := NewRouter()
|
||||
handler := Handler(func(c *Context) *Response {
|
||||
handler := Controller(func(c *Context) *Response {
|
||||
c.GetLogger().Info(TEST_STR)
|
||||
return nil
|
||||
})
|
||||
|
|
@ -55,7 +55,7 @@ func TestPostRequest(t *testing.T) {
|
|||
|
||||
func TestDeleteRequest(t *testing.T) {
|
||||
r := NewRouter()
|
||||
handler := Handler(func(c *Context) *Response {
|
||||
handler := Controller(func(c *Context) *Response {
|
||||
c.GetLogger().Info(TEST_STR)
|
||||
return nil
|
||||
})
|
||||
|
|
@ -69,7 +69,7 @@ func TestDeleteRequest(t *testing.T) {
|
|||
|
||||
func TestPutRequest(t *testing.T) {
|
||||
r := NewRouter()
|
||||
handler := Handler(func(c *Context) *Response {
|
||||
handler := Controller(func(c *Context) *Response {
|
||||
c.GetLogger().Info(TEST_STR)
|
||||
return nil
|
||||
})
|
||||
|
|
@ -83,7 +83,7 @@ func TestPutRequest(t *testing.T) {
|
|||
|
||||
func TestOptionsRequest(t *testing.T) {
|
||||
r := NewRouter()
|
||||
handler := Handler(func(c *Context) *Response {
|
||||
handler := Controller(func(c *Context) *Response {
|
||||
c.GetLogger().Info(TEST_STR)
|
||||
return nil
|
||||
})
|
||||
|
|
@ -97,7 +97,7 @@ func TestOptionsRequest(t *testing.T) {
|
|||
|
||||
func TestHeadRequest(t *testing.T) {
|
||||
r := NewRouter()
|
||||
handler := Handler(func(c *Context) *Response {
|
||||
handler := Controller(func(c *Context) *Response {
|
||||
c.GetLogger().Info(TEST_STR)
|
||||
return nil
|
||||
})
|
||||
|
|
@ -111,11 +111,11 @@ func TestHeadRequest(t *testing.T) {
|
|||
|
||||
func TestAddMultipleRoutes(t *testing.T) {
|
||||
r := NewRouter()
|
||||
r.Get("/", Handler(func(c *Context) *Response {
|
||||
r.Get("/", Controller(func(c *Context) *Response {
|
||||
c.GetLogger().Info(TEST_STR)
|
||||
return nil
|
||||
}))
|
||||
r.Post("/", Handler(func(c *Context) *Response {
|
||||
r.Post("/", Controller(func(c *Context) *Response {
|
||||
c.GetLogger().Info(TEST_STR)
|
||||
return nil
|
||||
}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue