mirror of https://github.com/gofiber/fiber.git
🔥 Feature: Remove unnecessary session context edge case test
parent
e8b9fd632b
commit
21b5cf52df
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue