mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-28 09:56:31 +02:00
15 lines
243 B
Go
15 lines
243 B
Go
package requestid
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestFromContext(t *testing.T) {
|
|
id := New()
|
|
ctx := WithValue(context.Background(), id)
|
|
ctxID := FromContext(ctx)
|
|
assert.Equal(t, ctxID, id)
|
|
}
|