1
0
mirror of https://github.com/labstack/echo.git synced 2025-12-03 22:59:09 +02:00

First commit to v3, #665

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-09-22 22:53:44 -07:00
parent 04f45046b1
commit 2aec0353f5
66 changed files with 656 additions and 3264 deletions

View File

@@ -2,11 +2,11 @@ package middleware
import (
"net/http"
"net/http/httptest"
"testing"
"github.com/dgrijalva/jwt-go"
"github.com/labstack/echo"
"github.com/labstack/echo/test"
"github.com/stretchr/testify/assert"
)
@@ -148,10 +148,10 @@ func TestJWT(t *testing.T) {
tc.reqURL = "/"
}
req := test.NewRequest(echo.GET, tc.reqURL, nil)
res := test.NewResponseRecorder()
req.Header().Set(echo.HeaderAuthorization, tc.hdrAuth)
req.Header().Set(echo.HeaderCookie, tc.hdrCookie)
req, _ := http.NewRequest(echo.GET, tc.reqURL, nil)
res := httptest.NewRecorder()
req.Header.Set(echo.HeaderAuthorization, tc.hdrAuth)
req.Header.Set(echo.HeaderCookie, tc.hdrCookie)
c := e.NewContext(req, res)
if tc.expPanic {