1
0
mirror of https://github.com/labstack/echo.git synced 2025-03-21 21:27:04 +02:00

Fixed engine tests

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-08-18 11:43:57 -07:00
parent 18b9e23ace
commit b939bee425
2 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import (
"testing"
"github.com/labstack/echo"
"github.com/labstack/echo/engine"
"github.com/stretchr/testify/assert"
"github.com/valyala/fasthttp"
)
@ -13,6 +14,8 @@ import (
// TODO: Fix me
func TestServer(t *testing.T) {
s := New("")
s.SetHandler(engine.HandlerFunc(func(req engine.Request, res engine.Response) {
}))
ctx := new(fasthttp.RequestCtx)
s.ServeHTTP(ctx)
}

View File

@ -7,12 +7,15 @@ import (
"testing"
"github.com/labstack/echo"
"github.com/labstack/echo/engine"
"github.com/stretchr/testify/assert"
)
// TODO: Fix me
func TestServer(t *testing.T) {
s := New("")
s.SetHandler(engine.HandlerFunc(func(req engine.Request, res engine.Response) {
}))
rec := httptest.NewRecorder()
req := new(http.Request)
s.ServeHTTP(rec, req)