mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-01-23 21:28:15 -05:00
18 lines
385 B
Go
18 lines
385 B
Go
package context
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"go.uber.org/goleak"
|
|
)
|
|
|
|
func TestGetString(t *testing.T) {
|
|
// goleak is used to detect goroutine leaks
|
|
defer goleak.VerifyNone(t, goleak.IgnoreAnyFunction("database/sql.(*DB).connectionOpener"))
|
|
|
|
t.Run("basic test", func(t *testing.T) {
|
|
assert.Equal(t, "context value: Body", BodyCtxKey.String())
|
|
})
|
|
}
|