1
0
mirror of https://github.com/labstack/echo.git synced 2025-06-21 00:29:32 +02:00

Fix Context#SetContext()/Context#Context()

This commit is contained in:
Kazuhiro Kubota
2016-08-22 20:41:07 +09:00
parent 98061d3ce3
commit 48c42e7b90
2 changed files with 8 additions and 1 deletions

View File

@ -328,7 +328,8 @@ func TestContextRedirect(t *testing.T) {
}
func TestContextEmbedded(t *testing.T) {
c := new(echoContext)
var c Context
c = new(echoContext)
c.SetContext(context.WithValue(c, "key", "val"))
assert.Equal(t, "val", c.Value("key"))
now := time.Now()