mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 03:17:04 +00:00
add access to the session manager through new 'Session.Man' field
relative to: https://github.com/kataras/iris/issues/1485 Former-commit-id: c4ced38b74af42bfcd17abe6b439b35db6837bbf
This commit is contained in:
@@ -237,12 +237,12 @@ func TestSessionsUpdateExpiration(t *testing.T) {
|
||||
app.Post("/remember_me", func(ctx iris.Context) {
|
||||
// re-sends the cookie with the new Expires and MaxAge fields,
|
||||
// test checks that on same session id too.
|
||||
sess.UpdateExpiration(ctx, 24*time.Hour)
|
||||
sessions.Get(ctx).Man.UpdateExpiration(ctx, 24*time.Hour)
|
||||
writeResponse(ctx)
|
||||
})
|
||||
|
||||
app.Get("/destroy", func(ctx iris.Context) {
|
||||
sess.Destroy(ctx) // this will delete the cookie too.
|
||||
sessions.Get(ctx).Man.Destroy(ctx) // this will delete the cookie too.
|
||||
})
|
||||
|
||||
e := httptest.New(t, app, httptest.URL("http://example.com"))
|
||||
|
||||
Reference in New Issue
Block a user