nginx-proxy-manager-zh/backend/internal/api/context/context_test.go
2023-11-08 09:57:15 +10:00

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())
})
}