🔥 Feature: Remove unnecessary session context edge case test

pull/3339/head
JIeJaitt 2025-03-12 19:23:22 +08:00
parent e8b9fd632b
commit 21b5cf52df
1 changed files with 0 additions and 14 deletions

View File

@ -1,7 +1,6 @@
package session
import (
"context"
"io"
"net/http/httptest"
"strings"
@ -501,16 +500,3 @@ func Test_Session_Context(t *testing.T) {
require.NoError(t, err)
require.Equal(t, "success", string(body))
}
func Test_Session_GoContext_EdgeCases(t *testing.T) {
t.Parallel()
// Test with nil context
sess := FromContext(nil) //nolint:staticcheck // Intentionally testing nil context behavior
require.Nil(t, sess, "Session should be nil with nil context")
// Test with context that doesn't have a session
ctx := context.Background()
sess = FromContext(ctx)
require.Nil(t, sess, "Session should be nil when not in context")
}