1
0
mirror of https://github.com/labstack/echo.git synced 2025-06-19 00:27:34 +02:00

Renamed Context#Context => Context#StdContext & Context#SetContext to ContextSetStdContext, 2d772e02ca

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-09-09 11:47:43 -07:00
parent 2d772e02ca
commit 00699ed0db
2 changed files with 12 additions and 5 deletions

View File

@ -343,11 +343,11 @@ func TestContextRedirect(t *testing.T) {
func TestContextEmbedded(t *testing.T) {
var c Context
c = new(echoContext)
c.SetContext(context.WithValue(c, "key", "val"))
c.SetStdContext(context.WithValue(c, "key", "val"))
assert.Equal(t, "val", c.Value("key"))
now := time.Now()
ctx, _ := context.WithDeadline(context.Background(), now)
c.SetContext(ctx)
c.SetStdContext(ctx)
n, _ := ctx.Deadline()
assert.Equal(t, now, n)
assert.Equal(t, context.DeadlineExceeded, c.Err())