package session import ( "log/slog" "github.com/gorilla/sessions" "sneak.berlin/go/webhooker/internal/config" ) // NewForTest creates a Session with a pre-configured cookie store for use // in tests. This bypasses the fx lifecycle and database dependency, allowing // middleware and handler tests to use real session functionality. The key // parameter is the raw 32-byte authentication key used for session encryption // and CSRF cookie signing. func NewForTest(store *sessions.CookieStore, cfg *config.Config, log *slog.Logger, key []byte) *Session { return &Session{ store: store, key: key, config: cfg, log: log, } }