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:
@ -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())
|
||||
|
Reference in New Issue
Block a user